summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-23 12:26:09 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-23 20:19:28 +0200
commitaddd3b52929395d4efdc40cfd40902888da8fdbe (patch)
treeacf78074bed3b7b6dc7a9d94ba16d003aa8a0602 /src/testlib
parent419db858f5bf73ff59d3c886003727eb7cab8400 (diff)
testlib: Spit out crash backtraces to stderr
Ensures that the backtrace is interleaved with the header and footer that we print ourselves. Change-Id: I728f4a05be31e345687cbb5fefe49f76dbe8ae36 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestcase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index ac8eeb6c27..992149ff20 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -220,7 +220,7 @@ static void stackTrace()
#endif
#ifdef Q_OS_LINUX
char cmd[512];
- qsnprintf(cmd, 512, "gdb --pid %d 2>/dev/null <<EOF\n"
+ qsnprintf(cmd, 512, "gdb --pid %d 1>&2 2>/dev/null <<EOF\n"
"set prompt\n"
"set height 0\n"
"thread apply all where full\n"
@@ -233,7 +233,7 @@ static void stackTrace()
fprintf(stderr, "=== End of stack trace ===\n");
#elif defined(Q_OS_MACOS)
char cmd[512];
- qsnprintf(cmd, 512, "lldb -p %d 2>/dev/null <<EOF\n"
+ qsnprintf(cmd, 512, "lldb -p %d 1>&2 2>/dev/null <<EOF\n"
"bt all\n"
"quit\n"
"EOF\n",