aboutsummaryrefslogtreecommitdiff
path: root/lldb.xcodeproj/project.pbxproj
diff options
context:
space:
mode:
authorKuba Brecka <kuba.brecka@gmail.com>2014-10-10 23:43:03 +0000
committerKuba Brecka <kuba.brecka@gmail.com>2014-10-10 23:43:03 +0000
commit1578e04b98e6766ea1c6ad8d47a8f5e193b27f51 (patch)
treeb3ce24f43a5ce1ef3ee25d718acf62e5a3c87473 /lldb.xcodeproj/project.pbxproj
parentba9dad445001699f7c5adbfa4f9dce64ecce9993 (diff)
downloadlldb-1578e04b98e6766ea1c6ad8d47a8f5e193b27f51.tar.gz
LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction
Reviewed at http://reviews.llvm.org/D5592 This patch gives LLDB some ability to interact with AddressSanitizer runtime library, on top of what we already have (historical memory stack traces provided by ASan). Namely, that's the ability to stop on an error caught by ASan, and access the report information that are associated with it. The report information is also exposed into SB API. More precisely this patch... adds a new plugin type, InstrumentationRuntime, which should serve as a generic superclass for other instrumentation runtime libraries, these plugins get notified when modules are loaded, so they get a chance to "activate" when a specific dynamic library is loaded an instance of this plugin type, AddressSanitizerRuntime, which activates itself when it sees the ASan dynamic library or founds ASan statically linked in the executable adds a collection of these plugins into the Process class AddressSanitizerRuntime sets an internal breakpoint on __asan::AsanDie(), and when this breakpoint gets hit, it retrieves the report information from ASan this breakpoint is then exposed as a new StopReason, eStopReasonInstrumentation, with a new StopInfo subclass, InstrumentationRuntimeStopInfo the StopInfo superclass is extended with a m_extended_info field (it's a StructuredData::ObjectSP), that can hold arbitrary JSON-like data, which is the way the new plugin provides the report data the "thread info" command now accepts a "-s" flag that prints out the JSON data of a stop reason (same way the "-j" flag works now) SBThread has a new API, GetStopReasonExtendedInfoAsJSON, which dumps the JSON string into a SBStream adds a test case for all of this I plan to also get rid of the original ASan plugin (memory history stack traces) and use an instance of AddressSanitizerRuntime for that purpose. Kuba git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lldb.xcodeproj/project.pbxproj')
-rw-r--r--lldb.xcodeproj/project.pbxproj34
1 files changed, 34 insertions, 0 deletions
diff --git a/lldb.xcodeproj/project.pbxproj b/lldb.xcodeproj/project.pbxproj
index 3454c9f56..b4d59d738 100644
--- a/lldb.xcodeproj/project.pbxproj
+++ b/lldb.xcodeproj/project.pbxproj
@@ -637,6 +637,9 @@
8CCB017E19BA28A80009FD44 /* ThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */; };
8CCB018219BA4E270009FD44 /* SBThreadCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CCB018119BA4E210009FD44 /* SBThreadCollection.h */; settings = {ATTRIBUTES = (Public, ); }; };
8CCB018319BA51BF0009FD44 /* SBThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */; };
+ 8CF02AE919DCC01900B14BE0 /* InstrumentationRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF02ADF19DCBF3B00B14BE0 /* InstrumentationRuntime.cpp */; };
+ 8CF02AEA19DCC02100B14BE0 /* AddressSanitizerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF02AE519DCBF8400B14BE0 /* AddressSanitizerRuntime.cpp */; };
+ 8CF02AEF19DD16B100B14BE0 /* InstrumentationRuntimeStopInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF02AED19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.cpp */; };
94094C6B163B6F840083A547 /* ValueObjectCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94094C69163B6CD90083A547 /* ValueObjectCast.cpp */; };
940B02F619DC96E700AD0F52 /* SBExecutionContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940B02F519DC96E700AD0F52 /* SBExecutionContext.cpp */; };
94145431175E63B500284436 /* lldb-versioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 94145430175D7FDE00284436 /* lldb-versioning.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1965,6 +1968,12 @@
8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SBThreadCollection.cpp; path = source/API/SBThreadCollection.cpp; sourceTree = "<group>"; };
8CCB018119BA4E210009FD44 /* SBThreadCollection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBThreadCollection.h; path = include/lldb/API/SBThreadCollection.h; sourceTree = "<group>"; };
8CCB018419BA54930009FD44 /* SBThreadCollection.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBThreadCollection.i; sourceTree = "<group>"; };
+ 8CF02ADF19DCBF3B00B14BE0 /* InstrumentationRuntime.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = InstrumentationRuntime.cpp; path = source/Target/InstrumentationRuntime.cpp; sourceTree = "<group>"; };
+ 8CF02AE019DCBF3B00B14BE0 /* InstrumentationRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InstrumentationRuntime.h; path = include/lldb/Target/InstrumentationRuntime.h; sourceTree = "<group>"; };
+ 8CF02AE519DCBF8400B14BE0 /* AddressSanitizerRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AddressSanitizerRuntime.cpp; sourceTree = "<group>"; };
+ 8CF02AE619DCBF8400B14BE0 /* AddressSanitizerRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddressSanitizerRuntime.h; sourceTree = "<group>"; };
+ 8CF02AED19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = InstrumentationRuntimeStopInfo.cpp; path = source/Target/InstrumentationRuntimeStopInfo.cpp; sourceTree = "<group>"; };
+ 8CF02AEE19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InstrumentationRuntimeStopInfo.h; path = include/lldb/Target/InstrumentationRuntimeStopInfo.h; sourceTree = "<group>"; };
94005E0313F438DF001EF42D /* python-wrapper.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-wrapper.swig"; sourceTree = "<group>"; };
94005E0513F45A1B001EF42D /* embedded_interpreter.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; name = embedded_interpreter.py; path = source/Interpreter/embedded_interpreter.py; sourceTree = "<group>"; };
94031A9F13CF5B3D00DCFF3C /* PriorityPointerPair.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PriorityPointerPair.h; path = include/lldb/Utility/PriorityPointerPair.h; sourceTree = "<group>"; };
@@ -2423,6 +2432,7 @@
260C897110F57C5600BB2B04 /* Plugins */ = {
isa = PBXGroup;
children = (
+ 8CF02ADD19DCBEC200B14BE0 /* InstrumentationRuntime */,
8C2D6A58197A1FB9006989C9 /* MemoryHistory */,
26DB3E051379E7AD0080DC73 /* ABI */,
260C897210F57C5600BB2B04 /* Disassembler */,
@@ -3746,6 +3756,10 @@
26BC7DEF10F1B80200F91463 /* Target */ = {
isa = PBXGroup;
children = (
+ 8CF02AE019DCBF3B00B14BE0 /* InstrumentationRuntime.h */,
+ 8CF02ADF19DCBF3B00B14BE0 /* InstrumentationRuntime.cpp */,
+ 8CF02AEE19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.h */,
+ 8CF02AED19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.cpp */,
3FDFD6C3199C396E009756A7 /* FileAction.h */,
3FDFDDBC199C3A06009756A7 /* FileAction.cpp */,
23EDE3311926843600F6A132 /* NativeRegisterContext.h */,
@@ -4264,6 +4278,23 @@
path = asan;
sourceTree = "<group>";
};
+ 8CF02ADD19DCBEC200B14BE0 /* InstrumentationRuntime */ = {
+ isa = PBXGroup;
+ children = (
+ 8CF02ADE19DCBEE600B14BE0 /* AddressSanitizer */,
+ );
+ path = InstrumentationRuntime;
+ sourceTree = "<group>";
+ };
+ 8CF02ADE19DCBEE600B14BE0 /* AddressSanitizer */ = {
+ isa = PBXGroup;
+ children = (
+ 8CF02AE519DCBF8400B14BE0 /* AddressSanitizerRuntime.cpp */,
+ 8CF02AE619DCBF8400B14BE0 /* AddressSanitizerRuntime.h */,
+ );
+ path = AddressSanitizer;
+ sourceTree = "<group>";
+ };
9457596415349416005A9070 /* POSIX */ = {
isa = PBXGroup;
children = (
@@ -4965,6 +4996,7 @@
2689000713353DB600698AC0 /* BreakpointSite.cpp in Sources */,
2689000913353DB600698AC0 /* BreakpointSiteList.cpp in Sources */,
26474CC918D0CB5B0073DEBA /* RegisterContextMemory.cpp in Sources */,
+ 8CF02AEA19DCC02100B14BE0 /* AddressSanitizerRuntime.cpp in Sources */,
26474CB218D0CB180073DEBA /* RegisterContextLinux_i386.cpp in Sources */,
26474CCB18D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.cpp in Sources */,
2689000B13353DB600698AC0 /* Stoppoint.cpp in Sources */,
@@ -5002,6 +5034,7 @@
2689002813353DDE00698AC0 /* CommandObjectThread.cpp in Sources */,
2689002913353DDE00698AC0 /* CommandObjectVersion.cpp in Sources */,
2689002A13353E0400698AC0 /* Address.cpp in Sources */,
+ 8CF02AE919DCC01900B14BE0 /* InstrumentationRuntime.cpp in Sources */,
2689002B13353E0400698AC0 /* AddressRange.cpp in Sources */,
236124A41986B4E2004EFC37 /* IOObject.cpp in Sources */,
2689002C13353E0400698AC0 /* AddressResolver.cpp in Sources */,
@@ -5223,6 +5256,7 @@
268900FA13353E6F00698AC0 /* ThreadList.cpp in Sources */,
268900FB13353E6F00698AC0 /* ThreadPlan.cpp in Sources */,
232CB619191E00CD00EF39FC /* NativeProcessProtocol.cpp in Sources */,
+ 8CF02AEF19DD16B100B14BE0 /* InstrumentationRuntimeStopInfo.cpp in Sources */,
268900FC13353E6F00698AC0 /* ThreadPlanBase.cpp in Sources */,
268900FD13353E6F00698AC0 /* ThreadPlanCallFunction.cpp in Sources */,
268900FE13353E6F00698AC0 /* ThreadPlanCallUserExpression.cpp in Sources */,