LLDB mainline
|
#include <InstrumentationRuntimeUBSan.h>
Public Member Functions | |
~InstrumentationRuntimeUBSan () override | |
llvm::StringRef | GetPluginName () override |
virtual lldb::InstrumentationRuntimeType | GetType () |
lldb::ThreadCollectionSP | GetBacktracesFromExtendedStopInfo (StructuredData::ObjectSP info) override |
Public Member Functions inherited from lldb_private::InstrumentationRuntime | |
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 lldb::InstrumentationRuntimeSP | CreateInstance (const lldb::ProcessSP &process_sp) |
static void | Initialize () |
static void | Terminate () |
static llvm::StringRef | GetPluginNameStatic () |
static lldb::InstrumentationRuntimeType | GetTypeStatic () |
Static Public Member Functions inherited from lldb_private::InstrumentationRuntime | |
static void | ModulesDidLoad (lldb_private::ModuleList &module_list, Process *process, InstrumentationRuntimeCollection &runtimes) |
Private Member Functions | |
InstrumentationRuntimeUBSan (const lldb::ProcessSP &process_sp) | |
const RegularExpression & | GetPatternForRuntimeLibrary () override |
Return a regular expression which can be used to identify a valid version of the runtime library. | |
bool | CheckIfRuntimeIsValid (const lldb::ModuleSP module_sp) override |
Check whether module_sp corresponds to a valid runtime library. | |
void | Activate () override |
Register a breakpoint in the runtime library and perform any other necessary initialization. | |
void | Deactivate () |
StructuredData::ObjectSP | RetrieveReportData (ExecutionContextRef exe_ctx_ref) |
Static Private Member Functions | |
static bool | NotifyBreakpointHit (void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id) |
Additional Inherited Members | |
Protected Member Functions inherited from lldb_private::InstrumentationRuntime | |
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. | |
Definition at line 19 of file InstrumentationRuntimeUBSan.h.
|
override |
Definition at line 41 of file InstrumentationRuntimeUBSan.cpp.
|
inlineprivate |
Definition at line 45 of file InstrumentationRuntimeUBSan.h.
|
overrideprivatevirtual |
Register a breakpoint in the runtime library and perform any other necessary initialization.
The runtime library is guaranteed to be loaded.
Implements lldb_private::InstrumentationRuntime.
Definition at line 247 of file InstrumentationRuntimeUBSan.cpp.
References lldb_private::Target::CreateBreakpoint(), lldb::eSymbolTypeCode, lldb_private::Symbol::GetAddressRef(), lldb_private::Stoppoint::GetID(), lldb_private::Address::GetOpcodeLoadAddress(), lldb_private::InstrumentationRuntime::GetProcessSP(), lldb_private::InstrumentationRuntime::GetRuntimeModuleSP(), lldb_private::Breakpoint::GetTarget(), lldb_private::InstrumentationRuntime::IsActive(), lldb_private::Address::IsValid(), LLDB_INVALID_ADDRESS, NotifyBreakpointHit(), lldb_private::InstrumentationRuntime::SetActive(), lldb_private::InstrumentationRuntime::SetBreakpointID(), lldb_private::Breakpoint::SetBreakpointKind(), lldb_private::Breakpoint::SetCallback(), and lldb_private::Symbol::ValueIsAddress().
|
overrideprivatevirtual |
Check whether module_sp
corresponds to a valid runtime library.
Implements lldb_private::InstrumentationRuntime.
Definition at line 238 of file InstrumentationRuntimeUBSan.cpp.
References lldb::eSymbolTypeAny.
|
static |
Definition at line 44 of file InstrumentationRuntimeUBSan.cpp.
Referenced by Initialize(), and Terminate().
|
private |
Definition at line 287 of file InstrumentationRuntimeUBSan.cpp.
References lldb_private::InstrumentationRuntime::GetBreakpointID(), lldb_private::InstrumentationRuntime::GetProcessSP(), LLDB_INVALID_BREAK_ID, lldb_private::InstrumentationRuntime::SetActive(), and lldb_private::InstrumentationRuntime::SetBreakpointID().
|
overridevirtual |
Reimplemented from lldb_private::InstrumentationRuntime.
Definition at line 301 of file InstrumentationRuntimeUBSan.cpp.
References lldb_private::InstrumentationRuntime::GetProcessSP(), GetStopReasonDescription(), and lldb_private::StructuredData::Object::GetUnsignedIntegerValue().
|
overrideprivatevirtual |
Return a regular expression which can be used to identify a valid version of the runtime library.
Implements lldb_private::InstrumentationRuntime.
Definition at line 233 of file InstrumentationRuntimeUBSan.cpp.
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 37 of file InstrumentationRuntimeUBSan.h.
References GetPluginNameStatic().
|
inlinestatic |
Definition at line 31 of file InstrumentationRuntimeUBSan.h.
Referenced by GetPluginName(), and Initialize().
|
inlinevirtual |
Definition at line 39 of file InstrumentationRuntimeUBSan.h.
References GetTypeStatic().
|
static |
Definition at line 59 of file InstrumentationRuntimeUBSan.cpp.
References lldb::eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer.
Referenced by GetType(), and Initialize().
|
static |
Definition at line 48 of file InstrumentationRuntimeUBSan.cpp.
References CreateInstance(), GetPluginNameStatic(), GetTypeStatic(), and lldb_private::PluginManager::RegisterPlugin().
|
staticprivate |
< false => resume execution.
Definition at line 200 of file InstrumentationRuntimeUBSan.cpp.
References lldb_private::InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData(), lldb_private::StoppointCallbackContext::exe_ctx_ref, lldb_private::InstrumentationRuntime::GetProcessSP(), lldb_private::ExecutionContextRef::GetProcessSP(), GetStopReasonDescription(), lldb_private::ExecutionContextRef::GetThreadSP(), and RetrieveReportData().
Referenced by Activate().
|
private |
Definition at line 104 of file InstrumentationRuntimeUBSan.cpp.
References lldb_private::StructuredData::Array::AddIntegerItem(), lldb_private::Status::AsCString(), DoNoSelectMostRelevantFrame, lldb::eExpressionCompleted, lldb::eLanguageTypeObjC_plus_plus, lldb_private::UserExpression::Evaluate(), lldb_private::Target::GetDebugger(), lldb_private::Address::GetLoadAddress(), lldb_private::Address::GetModule(), lldb_private::Debugger::GetOutputStreamSP(), lldb_private::InstrumentationRuntime::GetProcessSP(), lldb_private::InstrumentationRuntime::GetRuntimeModuleSP(), lldb_private::StreamString::GetString(), lldb_private::ExecutionContextRef::GetThreadSP(), lldb_private::Debugger::ReportWarning(), RetrieveString(), RetrieveUnsigned(), lldb_private::EvaluateExpressionOptions::SetAutoApplyFixIts(), lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints(), lldb_private::EvaluateExpressionOptions::SetLanguage(), lldb_private::EvaluateExpressionOptions::SetPrefix(), lldb_private::EvaluateExpressionOptions::SetStopOthers(), lldb_private::EvaluateExpressionOptions::SetTimeout(), lldb_private::EvaluateExpressionOptions::SetTryAllThreads(), lldb_private::EvaluateExpressionOptions::SetUnwindOnError(), ub_sanitizer_retrieve_report_data_command, and ub_sanitizer_retrieve_report_data_prefix.
Referenced by NotifyBreakpointHit().
|
static |
Definition at line 55 of file InstrumentationRuntimeUBSan.cpp.
References CreateInstance(), and lldb_private::PluginManager::UnregisterPlugin().