2013-09-25 18:37:32 +08:00
|
|
|
include_directories(../Plugins/Process/Utility)
|
|
|
|
|
|
|
|
add_lldb_library(lldbTarget
|
|
|
|
ABI.cpp
|
|
|
|
CPPLanguageRuntime.cpp
|
|
|
|
ExecutionContext.cpp
|
2014-08-15 00:01:25 +08:00
|
|
|
FileAction.cpp
|
2014-03-06 08:14:12 +08:00
|
|
|
JITLoader.cpp
|
|
|
|
JITLoaderList.cpp
|
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-11 07:43:03 +08:00
|
|
|
InstrumentationRuntime.cpp
|
|
|
|
InstrumentationRuntimeStopInfo.cpp
|
2015-08-28 05:45:59 +08:00
|
|
|
Language.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
LanguageRuntime.cpp
|
|
|
|
Memory.cpp
|
2014-09-04 09:03:18 +08:00
|
|
|
MemoryHistory.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
ObjCLanguageRuntime.cpp
|
|
|
|
OperatingSystem.cpp
|
|
|
|
PathMappingList.cpp
|
|
|
|
Platform.cpp
|
|
|
|
Process.cpp
|
2014-06-30 08:30:53 +08:00
|
|
|
ProcessInfo.cpp
|
|
|
|
ProcessLaunchInfo.cpp
|
2013-12-13 08:29:16 +08:00
|
|
|
Queue.cpp
|
|
|
|
QueueItem.cpp
|
|
|
|
QueueList.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
RegisterContext.cpp
|
2013-12-06 16:49:14 +08:00
|
|
|
SectionLoadHistory.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SectionLoadList.cpp
|
|
|
|
StackFrame.cpp
|
|
|
|
StackFrameList.cpp
|
|
|
|
StackID.cpp
|
|
|
|
StopInfo.cpp
|
2016-08-19 12:21:48 +08:00
|
|
|
StructuredDataPlugin.cpp
|
2013-11-05 11:57:19 +08:00
|
|
|
SystemRuntime.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
Target.cpp
|
|
|
|
TargetList.cpp
|
|
|
|
Thread.cpp
|
2014-09-06 04:11:22 +08:00
|
|
|
ThreadCollection.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
ThreadList.cpp
|
|
|
|
ThreadPlan.cpp
|
|
|
|
ThreadPlanBase.cpp
|
|
|
|
ThreadPlanCallFunction.cpp
|
Expression evaluation, a new ThreadPlanCallFunctionUsingABI for executing a function call on target via register manipulation
For Hexagon we want to be able to call functions during debugging, however currently lldb only supports this when there is JIT support.
Although emulation using IR interpretation is an alternative, it is currently limited in that it can't make function calls.
In this patch we have extended the IR interpreter so that it can execute a function call on the target using register manipulation.
To do this we need to handle the Call IR instruction, passing arguments to a new thread plan and collecting any return values to pass back into the IR interpreter.
The new thread plan is needed to call an alternative ABI interface of "ABI::PerpareTrivialCall()", allowing more detailed information about arguments and return values.
Reviewers: jingham, spyffe
Subscribers: emaste, lldb-commits, ted, ADodds, deepak2427
Differential Revision: http://reviews.llvm.org/D9404
llvm-svn: 242137
2015-07-14 18:56:58 +08:00
|
|
|
ThreadPlanCallFunctionUsingABI.cpp
|
2016-08-19 12:21:48 +08:00
|
|
|
ThreadPlanCallOnFunctionExit.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
ThreadPlanCallUserExpression.cpp
|
2014-09-30 23:58:56 +08:00
|
|
|
ThreadPlanPython.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
ThreadPlanRunToAddress.cpp
|
|
|
|
ThreadPlanShouldStopHere.cpp
|
|
|
|
ThreadPlanStepInRange.cpp
|
|
|
|
ThreadPlanStepInstruction.cpp
|
|
|
|
ThreadPlanStepOut.cpp
|
|
|
|
ThreadPlanStepOverBreakpoint.cpp
|
|
|
|
ThreadPlanStepOverRange.cpp
|
|
|
|
ThreadPlanStepRange.cpp
|
|
|
|
ThreadPlanStepThrough.cpp
|
|
|
|
ThreadPlanStepUntil.cpp
|
|
|
|
ThreadPlanTracer.cpp
|
|
|
|
ThreadSpec.cpp
|
|
|
|
UnixSignals.cpp
|
|
|
|
UnwindAssembly.cpp
|
|
|
|
)
|