teak-llvm/lldb/scripts/Python/interface
Kuba Brecka afdf842b3f 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

llvm-svn: 219546
2014-10-10 23:43:03 +00:00
..
SBAddress.i Make it clear that the load_addr property on SBAddress relies on lldb.target, 2014-08-27 22:05:14 +00:00
SBBlock.i <rdar://problem/13281528> 2013-02-25 21:53:07 +00:00
SBBreakpoint.i Add the ability to set python breakpoint commands from the SBBreakpoint & SBBreakpointLocation API's. 2014-04-02 01:04:55 +00:00
SBBreakpointLocation.i Add the ability to set python breakpoint commands from the SBBreakpoint & SBBreakpointLocation API's. 2014-04-02 01:04:55 +00:00
SBBroadcaster.i <rdar://problem/11742979> 2013-05-03 01:29:27 +00:00
SBCommandInterpreter.i Merging the iohandler branch back into main. 2014-01-27 23:43:24 +00:00
SBCommandReturnObject.i Second attempt at getting the PyCallable changes in trunk 2013-07-09 20:14:26 +00:00
SBCommunication.i
SBCompileUnit.i Added the ability to get a list of types from a SBModule or SBCompileUnit. Sebastien Metrot wanted this, and sent a hollowed out patch. I filled in the blanks and did the low level implementation. The new functions are: 2013-06-18 22:51:05 +00:00
SBData.i <rdar://problem/13646047> 2013-06-11 22:06:06 +00:00
SBDebugger.i Merging the iohandler branch back into main. 2014-01-27 23:43:24 +00:00
SBDeclaration.i <rdar://problem/11742979> 2013-05-03 01:29:27 +00:00
SBError.i
SBEvent.i
SBExecutionContext.i Add a new SBExecutionContext class that wraps an ExecutionContextRef. This class is a convenient way at the API level to package a target,process,thread and frame all together - or just a subset of those 2014-10-01 20:43:45 +00:00
SBExpressionOptions.i Add an option to suppress the persistent result variable when running EvaluateExpression 2014-08-08 21:45:36 +00:00
SBFileSpec.i Fix typos. 2014-07-01 21:22:11 +00:00
SBFileSpecList.i
SBFrame.i Fix typos. 2014-07-01 21:22:11 +00:00
SBFunction.i <rdar://problem/11742979> 2013-05-03 01:29:27 +00:00
SBHostOS.i (no commit message) 2014-07-30 17:38:47 +00:00
SBInstruction.i
SBInstructionList.i
SBLineEntry.i <rdar://problem/11742979> 2013-05-03 01:29:27 +00:00
SBListener.i Fix a few typos. 2014-06-27 02:42:12 +00:00
SBModule.i Added the ability to get the type that a typedef points to via: 2014-01-23 21:38:34 +00:00
SBModuleSpec.i Added a way to extract the module specifications from a file. A module specification is information that is required to describe a module (executable, shared library, object file, ect). This information includes host path, platform path (remote path), symbol file path, UUID, object name (for objects in .a files for example you could have an object name of "foo.o"), and target triple. Module specification can be used to create a module, or used to add a module to a target. A list of module specifications can be used to enumerate objects in container objects (like universal mach files and BSD archive files). 2013-07-08 22:22:41 +00:00
SBPlatform.i Expose SBPlatform through the public API. 2013-11-20 21:07:01 +00:00
SBProcess.i Implement ASan history threads in SB API 2014-09-06 01:33:13 +00:00
SBQueue.i Add a SBQueue::GetKind() method to retrieve the type of libdispatch queue (serial or concurrent). 2014-03-13 02:54:54 +00:00
SBQueueItem.i Add new Queue, QueueItem, Queuelist, SBQueue, SBQueueItem classes to represent 2013-12-13 00:29:16 +00:00
SBSection.i Added a SBSection::GetParent() to the API. 2013-06-13 21:23:23 +00:00
SBSourceManager.i
SBStream.i Fix some typos: 2014-08-11 18:06:28 +00:00
SBStringList.i
SBSymbol.i <rdar://problem/11742979> 2013-05-03 01:29:27 +00:00
SBSymbolContext.i
SBSymbolContextList.i
SBTarget.i Fix for 218140 for SBTarget.i, the added functions were in the wrong class definition 2014-09-19 20:12:24 +00:00
SBThread.i LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction 2014-10-10 23:43:03 +00:00
SBThreadCollection.i Expose ThreadCollection in SB API 2014-09-06 01:21:19 +00:00
SBThreadPlan.i This checkin is the first step in making the lldb thread stepping mechanism more accessible from 2014-09-29 23:17:18 +00:00
SBType.i Extend the member function discovery APIs to also support Objective-C as well as C++ 2014-09-19 18:21:05 +00:00
SBTypeCategory.i Improvements to the data formatters SB API: 2013-06-11 22:58:32 +00:00
SBTypeEnumMember.i Add support for inspecting enum members. 2014-06-02 20:55:29 +00:00
SBTypeFilter.i <rdar://problem/11742979> 2013-05-03 01:29:27 +00:00
SBTypeFormat.i Add a new way to bind a format to a type: by enum type 2013-12-28 08:44:02 +00:00
SBTypeNameSpecifier.i <rdar://problem/11742979> 2013-05-03 01:29:27 +00:00
SBTypeSummary.i <rdar://problem/11742979> 2013-05-03 01:29:27 +00:00
SBTypeSynthetic.i <rdar://problem/11742979> 2013-05-03 01:29:27 +00:00
SBUnixSignals.i Add SBUnixSignals.i 2014-06-23 20:49:41 +00:00
SBValue.i Expose the ability to retrieve the result of a type validator via the SB API. To keep it simple, do not expose the pair, but just return a NULL string for success, and a non-NULL string for error; If we were to decide to expose the pair, we would need an SBTypeValidatorResult, which is fine, but it should come as part of exposing type validators through the SB API rather than as a one-off thing. So, KISS for now 2014-09-06 01:30:04 +00:00
SBValueList.i
SBWatchpoint.i Adding events when watchpoints are set or changed. 2012-12-18 02:03:49 +00:00