From 97d33501a3e023c5cd36f24f2f13d71869f3151b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 14 May 2025 14:19:24 -0700 Subject: [PATCH] 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 (cherry picked from commit 2da64908c250203c7d17031a6b5c1d769b6215a2) Reviewed-by: Qt Cherry-pick Bot --- src/testlib/qtestcrashhandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/testlib/qtestcrashhandler.cpp b/src/testlib/qtestcrashhandler.cpp index ab4e5f4a656..c70abc6ca18 100644 --- a/src/testlib/qtestcrashhandler.cpp +++ b/src/testlib/qtestcrashhandler.cpp @@ -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: