aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2022-04-07 11:12:09 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2022-04-07 11:21:02 -0700
commitee2d9b8723561fb6a81b9c2c4fd7a93300c6154f (patch)
tree3b2621c0e438d0e5b3ded515942df08d4bfcc965 /lldb/packages/Python/lldbsuite/test/dotest.py
parent50de659adcc19c4c197ba5e9a7719325af7151ee (diff)
downloadllvm-ee2d9b8723561fb6a81b9c2c4fd7a93300c6154f.zip
llvm-ee2d9b8723561fb6a81b9c2c4fd7a93300c6154f.tar.gz
llvm-ee2d9b8723561fb6a81b9c2c4fd7a93300c6154f.tar.bz2
[lldb] Add Python bindings to print stack traces on crashes.
As noticed in D87637, when LLDB crashes, we only print stack traces if LLDB is directly executed, not when used via Python bindings. Enabling this by default may be undesirable (libraries shouldn't be messing with signal handlers), so make this an explicit opt-in. I "commandeered" this patch from Jordan Rupprecht who put this up for review originally. Differential revision: https://reviews.llvm.org/D91835
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 5cf7539..489e6ce 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -880,6 +880,7 @@ def run_suite():
import lldb
lldb.SBDebugger.Initialize()
+ lldb.SBDebugger.PrintStackTraceOnError()
checkLibcxxSupport()
checkLibstdcxxSupport()