Go to file
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
clang Treat -mios-simulator-version-min option as an alias for -mios-version-min. 2014-10-10 23:10:10 +00:00
clang-tools-extra Small cleanups from review comments. 2014-10-09 13:22:46 +00:00
compiler-rt [asan][mips] Adding support of asan for mipsel arch 2014-10-10 13:46:55 +00:00
debuginfo-tests Properly shutdown lldb by invoking SBDebugger_Terminate() 2014-10-09 22:16:46 +00:00
libclc Implement log1p builtin 2014-10-07 20:22:42 +00:00
libcxx Fix for PR 19616: 'tuple_cat of nested tuples fails in noexcept specification'. Thanks to Louis Dionne for the fix. 2014-10-07 21:42:12 +00:00
libcxxabi Use __atomic_exchange_n instead of Clang's __sync_swap 2014-10-03 20:03:47 +00:00
lld Reapply [ELF] Only mark as DT_NEEDED libs that are strictly necessary (r219353) 2014-10-09 22:06:38 +00:00
lldb LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction 2014-10-10 23:43:03 +00:00
llvm [MCJIT] Replace memcpy with readBytesUnaligned in RuntimeDyldMachOI386. 2014-10-10 23:07:09 +00:00
openmp I apologise in advance for the size of this check-in. At Intel we do 2014-10-07 16:25:50 +00:00
polly Relax the condition on the jsop accesses regarding the alignment. 2014-10-10 15:14:29 +00:00