LLDB  mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
lldb_private::InstrumentationRuntime Class Referenceabstract

#include <InstrumentationRuntime.h>

Inheritance diagram for lldb_private::InstrumentationRuntime:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::InstrumentationRuntime:
Collaboration graph
[legend]

Public Member Functions

void ModulesDidLoad (lldb_private::ModuleList &module_list)
 Look for the instrumentation runtime in module_list. More...
 
bool IsActive () const
 
virtual lldb::ThreadCollectionSP GetBacktracesFromExtendedStopInfo (StructuredData::ObjectSP info)
 
- Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
 
virtual ~PluginInterface ()=default
 
virtual ConstString GetPluginName ()=0
 
 PluginInterface (const PluginInterface &)=delete
 
PluginInterfaceoperator= (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 RegularExpressionGetPatternForRuntimeLibrary ()=0
 Return a regular expression which can be used to identify a valid version of the runtime library. More...
 
virtual bool CheckIfRuntimeIsValid (const lldb::ModuleSP module_sp)=0
 Check whether module_sp corresponds to a valid runtime library. More...
 
virtual void Activate ()=0
 Register a breakpoint in the runtime library and perform any other necessary initialization. More...
 

Private Attributes

lldb::ProcessWP m_process_wp
 The instrumented process. More...
 
lldb::ModuleSP m_runtime_module
 The module containing the instrumentation runtime. More...
 
lldb::user_id_t m_breakpoint_id
 The breakpoint in the instrumentation runtime. More...
 
bool m_is_active
 Indicates whether or not breakpoints have been registered in the instrumentation runtime. More...
 

Detailed Description

Definition at line 27 of file InstrumentationRuntime.h.

Constructor & Destructor Documentation

◆ InstrumentationRuntime()

lldb_private::InstrumentationRuntime::InstrumentationRuntime ( const lldb::ProcessSP &  process_sp)
inlineprotected

Definition at line 44 of file InstrumentationRuntime.h.

References m_process_wp.

Member Function Documentation

◆ Activate()

virtual void lldb_private::InstrumentationRuntime::Activate ( )
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::InstrumentationRuntimeMainThreadChecker, lldb_private::InstrumentationRuntimeUBSan, lldb_private::InstrumentationRuntimeTSan, and lldb_private::InstrumentationRuntimeASan.

◆ CheckIfRuntimeIsValid()

virtual bool lldb_private::InstrumentationRuntime::CheckIfRuntimeIsValid ( const lldb::ModuleSP  module_sp)
protectedpure virtual

◆ GetBacktracesFromExtendedStopInfo()

lldb::ThreadCollectionSP InstrumentationRuntime::GetBacktracesFromExtendedStopInfo ( StructuredData::ObjectSP  info)
virtual

◆ GetBreakpointID()

lldb::user_id_t lldb_private::InstrumentationRuntime::GetBreakpointID ( ) const
inlineprotected

Definition at line 59 of file InstrumentationRuntime.h.

References m_breakpoint_id.

◆ GetPatternForRuntimeLibrary()

virtual const RegularExpression& lldb_private::InstrumentationRuntime::GetPatternForRuntimeLibrary ( )
protectedpure virtual

Return a regular expression which can be used to identify a valid version of the runtime library.

Implemented in lldb_private::InstrumentationRuntimeMainThreadChecker, lldb_private::InstrumentationRuntimeUBSan, lldb_private::InstrumentationRuntimeTSan, and lldb_private::InstrumentationRuntimeASan.

◆ GetProcessSP()

lldb::ProcessSP lldb_private::InstrumentationRuntime::GetProcessSP ( )
inlineprotected

◆ GetRuntimeModuleSP()

lldb::ModuleSP lldb_private::InstrumentationRuntime::GetRuntimeModuleSP ( )
inlineprotected

Definition at line 53 of file InstrumentationRuntime.h.

References m_runtime_module.

◆ IsActive()

bool lldb_private::InstrumentationRuntime::IsActive ( ) const
inline

Definition at line 87 of file InstrumentationRuntime.h.

References m_is_active.

Referenced by SetActive().

◆ ModulesDidLoad() [1/2]

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 lldb_private::RegularExpression::Execute(), lldb_private::ModuleList::ForEach(), lldb_private::ConstString::GetCString(), and lldb_private::FileSpec::GetFilename().

◆ ModulesDidLoad() [2/2]

void InstrumentationRuntime::ModulesDidLoad ( lldb_private::ModuleList module_list,
lldb_private::Process process,
InstrumentationRuntimeCollection runtimes 
)
static

Definition at line 20 of file InstrumentationRuntime.cpp.

Referenced by lldb_private::Process::ModulesDidLoad().

◆ SetActive()

void lldb_private::InstrumentationRuntime::SetActive ( bool  IsActive)
inlineprotected

Definition at line 63 of file InstrumentationRuntime.h.

References IsActive(), and m_is_active.

◆ SetBreakpointID()

void lldb_private::InstrumentationRuntime::SetBreakpointID ( lldb::user_id_t  ID)
inlineprotected

Definition at line 61 of file InstrumentationRuntime.h.

References ID, and m_breakpoint_id.

◆ SetRuntimeModuleSP()

void lldb_private::InstrumentationRuntime::SetRuntimeModuleSP ( lldb::ModuleSP  module_sp)
inlineprotected

Definition at line 55 of file InstrumentationRuntime.h.

References m_runtime_module.

Member Data Documentation

◆ m_breakpoint_id

lldb::user_id_t lldb_private::InstrumentationRuntime::m_breakpoint_id
private

The breakpoint in the instrumentation runtime.

Definition at line 37 of file InstrumentationRuntime.h.

Referenced by GetBreakpointID(), and SetBreakpointID().

◆ m_is_active

bool lldb_private::InstrumentationRuntime::m_is_active
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().

◆ m_process_wp

lldb::ProcessWP lldb_private::InstrumentationRuntime::m_process_wp
private

The instrumented process.

Definition at line 31 of file InstrumentationRuntime.h.

Referenced by GetProcessSP(), and InstrumentationRuntime().

◆ m_runtime_module

lldb::ModuleSP lldb_private::InstrumentationRuntime::m_runtime_module
private

The module containing the instrumentation runtime.

Definition at line 34 of file InstrumentationRuntime.h.

Referenced by GetRuntimeModuleSP(), and SetRuntimeModuleSP().


The documentation for this class was generated from the following files: