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]

Public Member Functions

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

Static Public Member Functions

static void Initialize ()
 
static void Terminate ()
 
static llvm::StringRef GetPluginNameStatic ()
 
static llvm::StringRef 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.
 

Private Types

typedef std::map< lldb::addr_t, const lldb::ModuleSPJITObjectMap
 

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 71 of file JITLoaderGDB.h.

Constructor & Destructor Documentation

◆ JITLoaderGDB()

JITLoaderGDB::JITLoaderGDB ( lldb_private::Process process)

Definition at line 146 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

◆ 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 166 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 172 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 439 of file JITLoaderGDB.cpp.

References LLDB_BREAK_ID_IS_VALID, and m_jit_break_id.

Referenced by ModulesDidLoad(), and SetJITBreakpoint().

◆ GetPluginDescriptionStatic()

llvm::StringRef JITLoaderGDB::GetPluginDescriptionStatic ( )
static

Definition at line 424 of file JITLoaderGDB.cpp.

Referenced by Initialize().

◆ GetPluginName()

llvm::StringRef JITLoaderGDB::GetPluginName ( )
inlineoverridevirtual

Implements lldb_private::PluginInterface.

Definition at line 38 of file JITLoaderGDB.h.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

static llvm::StringRef JITLoaderGDB::GetPluginNameStatic ( )
inlinestatic

Definition at line 28 of file JITLoaderGDB.h.

Referenced by GetPluginName(), and Initialize().

◆ 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

Definition at line 216 of file JITLoaderGDB.cpp.

References lldb_private::GetLog(), LLDB_LOGF, and ReadJITDescriptor().

Referenced by SetJITBreakpoint().

◆ 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 178 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

Member Data Documentation

◆ m_jit_break_id

lldb::user_id_t JITLoaderGDB::m_jit_break_id
private

Definition at line 74 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 75 of file JITLoaderGDB.h.

Referenced by ReadJITDescriptorImpl(), and SetJITBreakpoint().

◆ m_jit_objects

JITObjectMap JITLoaderGDB::m_jit_objects
private

Definition at line 72 of file JITLoaderGDB.h.

Referenced by ReadJITDescriptorImpl().


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