summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-04-07 12:49:17 +0200
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-04-08 10:32:11 +0000
commit161fbfda70700c593dc4ce9952a572ae914c7398 (patch)
treeffb340a05c18792ea2110e8e0d11bf89ca5826b9 /src/testlib
parent24914b1acbfc5e45768dd1465b9e3f3e61185829 (diff)
Improve gdb backtrace handling
Long backtraces would get cut off in the terminal, this is especially bothersome when having lots of threads. Make sure that the output is complet by setting height=0 for gdb. The gdb manual states: "If you specify a height of either unlimited or zero lines, gdb does not pause during output no matter how long the output is. This is useful if output is to a file or to an editor buffer." Change-Id: I282054bc9e205d67d3076e37d5c928475803b22d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestcase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 339db2246e..8de631094d 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -114,6 +114,7 @@ static void stackTrace()
char cmd[512];
qsnprintf(cmd, 512, "gdb --pid %d 2>/dev/null <<EOF\n"
"set prompt\n"
+ "set height 0\n"
"thread apply all where full\n"
"detach\n"
"quit\n"