LLDB mainline
|
#include <InstrumentationRuntime.h>
Public Member Functions | |
void | ModulesDidLoad (lldb_private::ModuleList &module_list) |
Look for the instrumentation runtime in module_list . | |
bool | IsActive () const |
virtual lldb::ThreadCollectionSP | GetBacktracesFromExtendedStopInfo (StructuredData::ObjectSP info) |
Public Member Functions inherited from lldb_private::PluginInterface | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
virtual llvm::StringRef | GetPluginName ()=0 |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
static void | ModulesDidLoad (lldb_private::ModuleList &module_list, Process *process, InstrumentationRuntimeCollection &runtimes) |
Protected Member Functions | |
InstrumentationRuntime (const lldb::ProcessSP &process_sp) | |
lldb::ProcessSP | GetProcessSP () |
lldb::ModuleSP | GetRuntimeModuleSP () |
void | SetRuntimeModuleSP (lldb::ModuleSP module_sp) |
lldb::user_id_t | GetBreakpointID () const |
void | SetBreakpointID (lldb::user_id_t ID) |
void | SetActive (bool IsActive) |
virtual const RegularExpression & | GetPatternForRuntimeLibrary ()=0 |
Return a regular expression which can be used to identify a valid version of the runtime library. | |
virtual bool | CheckIfRuntimeIsValid (const lldb::ModuleSP module_sp)=0 |
Check whether module_sp corresponds to a valid runtime library. | |
virtual void | Activate ()=0 |
Register a breakpoint in the runtime library and perform any other necessary initialization. | |
Private Attributes | |
lldb::ProcessWP | m_process_wp |
The instrumented process. | |
lldb::ModuleSP | m_runtime_module |
The module containing the instrumentation runtime. | |
lldb::user_id_t | m_breakpoint_id |
The breakpoint in the instrumentation runtime. | |
bool | m_is_active |
Indicates whether or not breakpoints have been registered in the instrumentation runtime. | |
Definition at line 27 of file InstrumentationRuntime.h.
|
inlineprotected |
Definition at line 44 of file InstrumentationRuntime.h.
References m_process_wp.
|
protectedpure virtual |
Register a breakpoint in the runtime library and perform any other necessary initialization.
The runtime library is guaranteed to be loaded.
Implemented in lldb_private::InstrumentationRuntimeASan, InstrumentationRuntimeASanLibsanitizers, lldb_private::InstrumentationRuntimeMainThreadChecker, lldb_private::InstrumentationRuntimeTSan, and lldb_private::InstrumentationRuntimeUBSan.
Referenced by ModulesDidLoad().
|
protectedpure virtual |
Check whether module_sp
corresponds to a valid runtime library.
Implemented in lldb_private::InstrumentationRuntimeASan, InstrumentationRuntimeASanLibsanitizers, lldb_private::InstrumentationRuntimeMainThreadChecker, lldb_private::InstrumentationRuntimeTSan, and lldb_private::InstrumentationRuntimeUBSan.
Referenced by ModulesDidLoad().
|
virtual |
Reimplemented in lldb_private::InstrumentationRuntimeMainThreadChecker, lldb_private::InstrumentationRuntimeTSan, and lldb_private::InstrumentationRuntimeUBSan.
Definition at line 74 of file InstrumentationRuntime.cpp.
|
inlineprotected |
Definition at line 58 of file InstrumentationRuntime.h.
References m_breakpoint_id.
Referenced by lldb_private::InstrumentationRuntimeASan::Deactivate(), InstrumentationRuntimeASanLibsanitizers::Deactivate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Deactivate(), lldb_private::InstrumentationRuntimeTSan::Deactivate(), and lldb_private::InstrumentationRuntimeUBSan::Deactivate().
|
protectedpure virtual |
Return a regular expression which can be used to identify a valid version of the runtime library.
Implemented in lldb_private::InstrumentationRuntimeASan, InstrumentationRuntimeASanLibsanitizers, lldb_private::InstrumentationRuntimeMainThreadChecker, lldb_private::InstrumentationRuntimeTSan, and lldb_private::InstrumentationRuntimeUBSan.
Referenced by ModulesDidLoad().
|
inlineprotected |
Definition at line 50 of file InstrumentationRuntime.h.
References m_process_wp.
Referenced by lldb_private::InstrumentationRuntimeASan::Activate(), InstrumentationRuntimeASanLibsanitizers::Activate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::InstrumentationRuntimeASan::Deactivate(), InstrumentationRuntimeASanLibsanitizers::Deactivate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Deactivate(), lldb_private::InstrumentationRuntimeTSan::Deactivate(), lldb_private::InstrumentationRuntimeUBSan::Deactivate(), lldb_private::InstrumentationRuntimeTSan::GenerateSummary(), lldb_private::InstrumentationRuntimeMainThreadChecker::GetBacktracesFromExtendedStopInfo(), lldb_private::InstrumentationRuntimeTSan::GetBacktracesFromExtendedStopInfo(), lldb_private::InstrumentationRuntimeUBSan::GetBacktracesFromExtendedStopInfo(), lldb_private::InstrumentationRuntimeTSan::GetFirstNonInternalFramePc(), lldb_private::InstrumentationRuntimeTSan::GetLocationDescription(), InstrumentationRuntimeASanLibsanitizers::NotifyBreakpointHit(), lldb_private::InstrumentationRuntimeASan::NotifyBreakpointHit(), lldb_private::InstrumentationRuntimeMainThreadChecker::NotifyBreakpointHit(), lldb_private::InstrumentationRuntimeTSan::NotifyBreakpointHit(), lldb_private::InstrumentationRuntimeUBSan::NotifyBreakpointHit(), lldb_private::InstrumentationRuntimeMainThreadChecker::RetrieveReportData(), lldb_private::InstrumentationRuntimeTSan::RetrieveReportData(), and lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData().
|
inlineprotected |
Definition at line 52 of file InstrumentationRuntime.h.
References m_runtime_module.
Referenced by lldb_private::InstrumentationRuntimeASan::Activate(), InstrumentationRuntimeASanLibsanitizers::Activate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::InstrumentationRuntimeTSan::GetFirstNonInternalFramePc(), ModulesDidLoad(), lldb_private::InstrumentationRuntimeMainThreadChecker::RetrieveReportData(), and lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData().
|
inline |
Definition at line 86 of file InstrumentationRuntime.h.
References m_is_active.
Referenced by lldb_private::InstrumentationRuntimeASan::Activate(), InstrumentationRuntimeASanLibsanitizers::Activate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), ModulesDidLoad(), and SetActive().
void InstrumentationRuntime::ModulesDidLoad | ( | lldb_private::ModuleList & | module_list | ) |
Look for the instrumentation runtime in module_list
.
Register and activate the runtime if this hasn't already been done.
Definition at line 42 of file InstrumentationRuntime.cpp.
References Activate(), CheckIfRuntimeIsValid(), lldb_private::RegularExpression::Execute(), lldb_private::ModuleList::ForEach(), lldb_private::ConstString::GetCString(), lldb_private::FileSpec::GetFilename(), GetPatternForRuntimeLibrary(), GetRuntimeModuleSP(), IsActive(), and SetRuntimeModuleSP().
|
static |
Definition at line 20 of file InstrumentationRuntime.cpp.
References lldb_private::PluginManager::GetInstrumentationRuntimeCreateCallbackAtIndex(), and lldb_private::PluginManager::GetInstrumentationRuntimeGetTypeCallbackAtIndex().
Referenced by lldb_private::Process::ModulesDidLoad().
|
inlineprotected |
Definition at line 62 of file InstrumentationRuntime.h.
References IsActive(), and m_is_active.
Referenced by lldb_private::InstrumentationRuntimeASan::Activate(), InstrumentationRuntimeASanLibsanitizers::Activate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::InstrumentationRuntimeASan::Deactivate(), InstrumentationRuntimeASanLibsanitizers::Deactivate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Deactivate(), lldb_private::InstrumentationRuntimeTSan::Deactivate(), and lldb_private::InstrumentationRuntimeUBSan::Deactivate().
|
inlineprotected |
Definition at line 60 of file InstrumentationRuntime.h.
References ID, and m_breakpoint_id.
Referenced by lldb_private::InstrumentationRuntimeASan::Activate(), InstrumentationRuntimeASanLibsanitizers::Activate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::InstrumentationRuntimeASan::Deactivate(), InstrumentationRuntimeASanLibsanitizers::Deactivate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Deactivate(), lldb_private::InstrumentationRuntimeTSan::Deactivate(), and lldb_private::InstrumentationRuntimeUBSan::Deactivate().
|
inlineprotected |
Definition at line 54 of file InstrumentationRuntime.h.
References m_runtime_module.
Referenced by ModulesDidLoad().
|
private |
The breakpoint in the instrumentation runtime.
Definition at line 37 of file InstrumentationRuntime.h.
Referenced by GetBreakpointID(), and SetBreakpointID().
|
private |
Indicates whether or not breakpoints have been registered in the instrumentation runtime.
Definition at line 41 of file InstrumentationRuntime.h.
Referenced by IsActive(), and SetActive().
|
private |
The instrumented process.
Definition at line 31 of file InstrumentationRuntime.h.
Referenced by GetProcessSP(), and InstrumentationRuntime().
|
private |
The module containing the instrumentation runtime.
Definition at line 34 of file InstrumentationRuntime.h.
Referenced by GetRuntimeModuleSP(), and SetRuntimeModuleSP().