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.

Change-Id: I35e35bd3b79eeba49192fffd61474054cd089301
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 2da64908c250203c7d17031a6b5c1d769b6215a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2025-05-14 14:19:24 -07:00 committed by Qt Cherry-pick Bot
parent 61d14ea267
commit 97d33501a3

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: