LLDB  mainline
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
JITLoaderGDB Class Reference

#include <JITLoaderGDB.h>

Inheritance diagram for JITLoaderGDB:
Inheritance graph
[legend]
Collaboration diagram for JITLoaderGDB:
Collaboration graph
[legend]

Public Member Functions

 JITLoaderGDB (lldb_private::Process *process)
 
 ~JITLoaderGDB () override
 
lldb_private::ConstString GetPluginName () override
 
uint32_t GetPluginVersion () override
 
void DidAttach () override
 Called after attaching a process. More...
 
void DidLaunch () override
 Called after launching a process. More...
 
void ModulesDidLoad (lldb_private::ModuleList &module_list) override
 Called after a new shared object has been loaded so that it can be probed for JIT entry point hooks. More...
 
- Public Member Functions inherited from lldb_private::JITLoader
 JITLoader (Process *process)
 Construct with a process. More...
 
 ~JITLoader () override
 
- Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
 
virtual ~PluginInterface ()=default
 
 PluginInterface (const PluginInterface &)=delete
 
PluginInterfaceoperator= (const PluginInterface &)=delete
 

Static Public Member Functions

static void Initialize ()
 
static void Terminate ()
 
static lldb_private::ConstString GetPluginNameStatic ()
 
static const char * GetPluginDescriptionStatic ()
 
static lldb::JITLoaderSP CreateInstance (lldb_private::Process *process, bool force)
 
static void DebuggerInitialize (lldb_private::Debugger &debugger)
 
- Static Public Member Functions inherited from lldb_private::JITLoader
static void LoadPlugins (Process *process, lldb_private::JITLoaderList &list)
 Find a JIT loader plugin for a given process. More...
 

Private Types

typedef std::map< lldb::addr_t, const lldb::ModuleSP > JITObjectMap
 

Private Member Functions

lldb::addr_t GetSymbolAddress (lldb_private::ModuleList &module_list, lldb_private::ConstString name, lldb::SymbolType symbol_type) const
 
void SetJITBreakpoint (lldb_private::ModuleList &module_list)
 
bool DidSetJITBreakpoint () const
 
bool ReadJITDescriptor (bool all_entries)
 
template<typename ptr_t >
bool ReadJITDescriptorImpl (bool all_entries)
 

Static Private Member Functions

static bool JITDebugBreakpointHit (void *baton, lldb_private::StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
 
static void ProcessStateChangedCallback (void *baton, lldb_private::Process *process, lldb::StateType state)
 

Private Attributes

JITObjectMap m_jit_objects
 
lldb::user_id_t m_jit_break_id
 
lldb::addr_t m_jit_descriptor_addr
 

Additional Inherited Members

- Protected Attributes inherited from lldb_private::JITLoader
Processm_process
 

Detailed Description

Definition at line 17 of file JITLoaderGDB.h.

Member Typedef Documentation

◆ JITObjectMap

typedef std::map<lldb::addr_t, const lldb::ModuleSP> JITLoaderGDB::JITObjectMap
private

Definition at line 73 of file JITLoaderGDB.h.

Constructor & Destructor Documentation

◆ JITLoaderGDB()

JITLoaderGDB::JITLoaderGDB ( lldb_private::Process process)

Definition at line 148 of file JITLoaderGDB.cpp.

◆ ~JITLoaderGDB()

JITLoaderGDB::~JITLoaderGDB ( )
override

Member Function Documentation

◆ CreateInstance()

JITLoaderSP JITLoaderGDB::CreateInstance ( lldb_private::Process process,
bool  force 
)
static

◆ DebuggerInitialize()

void JITLoaderGDB::DebuggerInitialize ( lldb_private::Debugger debugger)
static

Definition at line 158 of file JITLoaderGDB.cpp.

Referenced by Initialize().

◆ DidAttach()

void JITLoaderGDB::DidAttach ( )
overridevirtual

Called after attaching a process.

Allow JITLoader plug-ins to execute some code after attaching to a process.

Implements lldb_private::JITLoader.

Definition at line 169 of file JITLoaderGDB.cpp.

References lldb_private::Target::GetImages(), lldb_private::Process::GetTarget(), lldb_private::JITLoader::m_process, and SetJITBreakpoint().

◆ DidLaunch()

void JITLoaderGDB::DidLaunch ( )
overridevirtual

Called after launching a process.

Allow JITLoader plug-ins to execute some code after the process has stopped for the first time on launch.

Implements lldb_private::JITLoader.

Definition at line 175 of file JITLoaderGDB.cpp.

References lldb_private::Target::GetImages(), lldb_private::Process::GetTarget(), lldb_private::JITLoader::m_process, and SetJITBreakpoint().

◆ DidSetJITBreakpoint()

bool JITLoaderGDB::DidSetJITBreakpoint ( ) const
private

Definition at line 453 of file JITLoaderGDB.cpp.

References LLDB_BREAK_ID_IS_VALID, and m_jit_break_id.

Referenced by ModulesDidLoad(), and SetJITBreakpoint().

◆ GetPluginDescriptionStatic()

const char * JITLoaderGDB::GetPluginDescriptionStatic ( )
static

Definition at line 432 of file JITLoaderGDB.cpp.

Referenced by Initialize().

◆ GetPluginName()

lldb_private::ConstString JITLoaderGDB::GetPluginName ( )
overridevirtual

Implements lldb_private::PluginInterface.

Definition at line 437 of file JITLoaderGDB.cpp.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

lldb_private::ConstString JITLoaderGDB::GetPluginNameStatic ( )
static

Definition at line 407 of file JITLoaderGDB.cpp.

Referenced by GetPluginName(), and Initialize().

◆ GetPluginVersion()

uint32_t JITLoaderGDB::GetPluginVersion ( )
overridevirtual

Implements lldb_private::PluginInterface.

Definition at line 441 of file JITLoaderGDB.cpp.

◆ GetSymbolAddress()

addr_t JITLoaderGDB::GetSymbolAddress ( lldb_private::ModuleList module_list,
lldb_private::ConstString  name,
lldb::SymbolType  symbol_type 
) const
private

◆ Initialize()

void JITLoaderGDB::Initialize ( )
static

◆ JITDebugBreakpointHit()

bool JITLoaderGDB::JITDebugBreakpointHit ( void *  baton,
lldb_private::StoppointCallbackContext context,
lldb::user_id_t  break_id,
lldb::user_id_t  break_loc_id 
)
staticprivate

◆ ModulesDidLoad()

void JITLoaderGDB::ModulesDidLoad ( lldb_private::ModuleList module_list)
overridevirtual

Called after a new shared object has been loaded so that it can be probed for JIT entry point hooks.

Implements lldb_private::JITLoader.

Definition at line 181 of file JITLoaderGDB.cpp.

References DidSetJITBreakpoint(), lldb_private::Process::IsAlive(), lldb_private::JITLoader::m_process, and SetJITBreakpoint().

◆ ProcessStateChangedCallback()

static void JITLoaderGDB::ProcessStateChangedCallback ( void *  baton,
lldb_private::Process process,
lldb::StateType  state 
)
staticprivate

◆ ReadJITDescriptor()

bool JITLoaderGDB::ReadJITDescriptor ( bool  all_entries)
private

◆ ReadJITDescriptorImpl()

template<typename ptr_t >
bool JITLoaderGDB::ReadJITDescriptorImpl ( bool  all_entries)
private

◆ SetJITBreakpoint()

void JITLoaderGDB::SetJITBreakpoint ( lldb_private::ModuleList module_list)
private

◆ Terminate()

void JITLoaderGDB::Terminate ( )
static

Definition at line 449 of file JITLoaderGDB.cpp.

References CreateInstance().

Member Data Documentation

◆ m_jit_break_id

lldb::user_id_t JITLoaderGDB::m_jit_break_id
private

Definition at line 76 of file JITLoaderGDB.h.

Referenced by DidSetJITBreakpoint(), SetJITBreakpoint(), and ~JITLoaderGDB().

◆ m_jit_descriptor_addr

lldb::addr_t JITLoaderGDB::m_jit_descriptor_addr
private

Definition at line 77 of file JITLoaderGDB.h.

Referenced by ReadJITDescriptorImpl(), and SetJITBreakpoint().

◆ m_jit_objects

JITObjectMap JITLoaderGDB::m_jit_objects
private

Definition at line 74 of file JITLoaderGDB.h.

Referenced by ReadJITDescriptorImpl().


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