QTest::CrashHandler: ask GDB for the memory mapping layout on crash too

Processes usually crash due to invalid pointers, but sometimes it's hard
to know if a given value is valid or not just by eyeballing it. So let's
ask GDB to print it.

I don't think LLDB has a way to do it.

Pick-to: 6.9
Change-Id: I35e35bd3b79eeba49192fffd61474054cd089301
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Thiago Macieira 2025-05-14 14:19:24 -07:00
parent a6070847f0
commit 2da64908c2

View File

@ -360,6 +360,7 @@ void generateStackTrace()
break;
case Gdb:
execlp("gdb", "gdb", "--nx", "--batch", "-ex", "thread apply all bt",
"-ex", "info proc mappings",
"--pid", pidbuffer.array.data(), nullptr);
break;
case Lldb: