summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/interface
diff options
context:
space:
mode:
authorKuba Brecka <kuba.brecka@gmail.com>2016-03-23 15:36:22 +0000
committerKuba Brecka <kuba.brecka@gmail.com>2016-03-23 15:36:22 +0000
commit6a83143650aeb02e9c53bd5f7b7b5253a6c8b157 (patch)
tree84b85e5d71064a4c24d0100811f7114f2143ab2f /lldb/scripts/interface
parentd68ed85401a5b1d40fb6065bcbd363e1bd78402d (diff)
downloadbcm5719-llvm-6a83143650aeb02e9c53bd5f7b7b5253a6c8b157.tar.gz
bcm5719-llvm-6a83143650aeb02e9c53bd5f7b7b5253a6c8b157.zip
Add ThreadSanitizer debugging support.
This patch adds ThreadSanitizer support into LLDB: - Adding a new InstrumentationRuntime plugin, ThreadSanitizerRuntime, in the same way ASan is implemented. - A breakpoint stops in `__tsan_on_report`, then we extract all sorts of information by evaluating an expression. We then populate this into StopReasonExtendedInfo. - SBThread gets a new API, SBThread::GetStopReasonExtendedBacktraces(), which returns TSan’s backtraces in the form of regular SBThreads. Non-TSan stop reasons return an empty collection. - Added some test cases. Reviewed by Greg Clayton. llvm-svn: 264162
Diffstat (limited to 'lldb/scripts/interface')
-rw-r--r--lldb/scripts/interface/SBThread.i9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/scripts/interface/SBThread.i b/lldb/scripts/interface/SBThread.i
index 50160590ad5..3dcb8484f02 100644
--- a/lldb/scripts/interface/SBThread.i
+++ b/lldb/scripts/interface/SBThread.i
@@ -118,6 +118,15 @@ public:
") GetStopReasonExtendedInfoAsJSON;
bool
GetStopReasonExtendedInfoAsJSON (lldb::SBStream &stream);
+
+ %feature("autodoc", "
+ Returns a collection of historical stack traces that are significant to the
+ current stop reason. Used by ThreadSanitizer, where we provide various stack
+ traces that were involved in a data race or other type of detected issue.
+ ") GetStopReasonExtendedBacktraces;
+ SBThreadCollection
+ GetStopReasonExtendedBacktraces (InstrumentationRuntimeType type);
+
%feature("autodoc", "
Pass only an (int)length and expect to get a Python string describing the
OpenPOWER on IntegriCloud