LLDB  mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
DynamicLoaderHexagonDYLD Class Reference

#include <DynamicLoaderHexagonDYLD.h>

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

Public Member Functions

 DynamicLoaderHexagonDYLD (lldb_private::Process *process)
 
 ~DynamicLoaderHexagonDYLD () override
 
void DidAttach () override
 Called after attaching a process. More...
 
void DidLaunch () override
 Called after launching a process. More...
 
lldb::ThreadPlanSP GetStepThroughTrampolinePlan (lldb_private::Thread &thread, bool stop_others) override
 Provides a plan to step through the dynamic loader trampoline for the current state of thread. More...
 
lldb_private::Status CanLoadImage () override
 Ask if it is ok to try and load or unload an shared library (image). More...
 
lldb::addr_t GetThreadLocalData (const lldb::ModuleSP module, const lldb::ThreadSP thread, lldb::addr_t tls_file_addr) override
 Retrieves the per-module TLS block for a given thread. More...
 
llvm::StringRef GetPluginName () override
 
- Public Member Functions inherited from lldb_private::DynamicLoader
 DynamicLoader (Process *process)
 Construct with a process. More...
 
virtual bool ProcessDidExec ()
 Helper function that can be used to detect when a process has called exec and is now a new and different process. More...
 
bool GetStopWhenImagesChange () const
 Get whether the process should stop when images change. More...
 
void SetStopWhenImagesChange (bool stop)
 Set whether the process should stop when images change. More...
 
virtual void FindEquivalentSymbols (Symbol *original_symbol, ModuleList &module_list, SymbolContextList &equivalent_symbols)
 Some dynamic loaders provide features where there are a group of symbols "equivalent to" a given symbol one of which will be chosen when the symbol is bound. More...
 
virtual bool AlwaysRelyOnEHUnwindInfo (SymbolContext &sym_ctx)
 Ask if the eh_frame information for the given SymbolContext should be relied on even when it's the first frame in a stack unwind. More...
 
virtual lldb::ModuleSP LoadModuleAtAddress (const lldb_private::FileSpec &file, lldb::addr_t link_map_addr, lldb::addr_t base_addr, bool base_addr_is_offset)
 Locates or creates a module given by file and updates/loads the resulting module at the virtual base address base_addr. More...
 
virtual bool GetSharedCacheInformation (lldb::addr_t &base_address, UUID &uuid, LazyBool &using_shared_cache, LazyBool &private_shared_cache)
 Get information about the shared cache for a process, if possible. More...
 
virtual bool IsFullyInitialized ()
 Return whether the dynamic loader is fully initialized and it's safe to call its APIs. More...
 
- 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 llvm::StringRef GetPluginNameStatic ()
 
static llvm::StringRef GetPluginDescriptionStatic ()
 
static lldb_private::DynamicLoaderCreateInstance (lldb_private::Process *process, bool force)
 
- Static Public Member Functions inherited from lldb_private::DynamicLoader
static DynamicLoaderFindPlugin (Process *process, llvm::StringRef plugin_name)
 Find a dynamic loader plugin for a given process. More...
 

Protected Member Functions

bool SetRendezvousBreakpoint ()
 Enables a breakpoint on a function called by the runtime linker each time a module is loaded or unloaded. More...
 
void RefreshModules ()
 Helper method for RendezvousBreakpointHit. More...
 
void UpdateLoadedSections (lldb::ModuleSP module, lldb::addr_t link_map_addr, lldb::addr_t base_addr, bool base_addr_is_offset) override
 Updates the load address of every allocatable section in module. More...
 
void UnloadSections (const lldb::ModuleSP module) override
 Removes the loaded sections from the target in module. More...
 
void LoadAllCurrentModules ()
 Helper for the entry breakpoint callback. More...
 
lldb::addr_t ComputeLoadOffset ()
 Computes a value for m_load_offset returning the computed address on success and LLDB_INVALID_ADDRESS on failure. More...
 
lldb::addr_t GetEntryPoint ()
 Computes a value for m_entry_point returning the computed address on success and LLDB_INVALID_ADDRESS on failure. More...
 
lldb::ModuleSP GetTargetExecutable ()
 Checks to see if the target module has changed, updates the target accordingly and returns the target executable module. More...
 
lldb::addr_t FindRendezvousBreakpointAddress ()
 return the address of the Rendezvous breakpoint More...
 
- Protected Member Functions inherited from lldb_private::DynamicLoader
lldb::ModuleSP GetTargetExecutable ()
 Checks to see if the target module has changed, updates the target accordingly and returns the target executable module. More...
 
void UpdateLoadedSectionsCommon (lldb::ModuleSP module, lldb::addr_t base_addr, bool base_addr_is_offset)
 
void UnloadSectionsCommon (const lldb::ModuleSP module)
 
const lldb_private::SectionListGetSectionListFromModule (const lldb::ModuleSP module) const
 
int64_t ReadUnsignedIntWithSizeInBytes (lldb::addr_t addr, int size_in_bytes)
 
lldb::addr_t ReadPointer (lldb::addr_t addr)
 
void LoadOperatingSystemPlugin (bool flush)
 

Static Protected Member Functions

static bool RendezvousBreakpointHit (void *baton, lldb_private::StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
 Callback routine which updates the current list of loaded modules based on the information supplied by the runtime linker. More...
 
static bool EntryBreakpointHit (void *baton, lldb_private::StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
 Callback routine invoked when we hit the breakpoint on process entry. More...
 

Protected Attributes

HexagonDYLDRendezvous m_rendezvous
 Runtime linker rendezvous structure. More...
 
lldb::addr_t m_load_offset
 Virtual load address of the inferior process. More...
 
lldb::addr_t m_entry_point
 Virtual entry address of the inferior process. More...
 
lldb::break_id_t m_dyld_bid
 Rendezvous breakpoint. More...
 
std::map< lldb::ModuleWP, lldb::addr_t, std::owner_less< lldb::ModuleWP > > m_loaded_modules
 Loaded module list. (link map for each module) More...
 
- Protected Attributes inherited from lldb_private::DynamicLoader
Processm_process
 The process that this dynamic loader plug-in is tracking. More...
 

Private Member Functions

const lldb_private::SectionListGetSectionListFromModule (const lldb::ModuleSP module) const
 

Detailed Description

Definition at line 17 of file DynamicLoaderHexagonDYLD.h.

Constructor & Destructor Documentation

◆ DynamicLoaderHexagonDYLD()

DynamicLoaderHexagonDYLD::DynamicLoaderHexagonDYLD ( lldb_private::Process process)

Definition at line 101 of file DynamicLoaderHexagonDYLD.cpp.

◆ ~DynamicLoaderHexagonDYLD()

DynamicLoaderHexagonDYLD::~DynamicLoaderHexagonDYLD ( )
override

Member Function Documentation

◆ CanLoadImage()

Status DynamicLoaderHexagonDYLD::CanLoadImage ( )
overridevirtual

Ask if it is ok to try and load or unload an shared library (image).

The dynamic loader often knows when it would be ok to try and load or unload a shared library. This function call allows the dynamic loader plug-ins to check any current dyld state to make sure it is an ok time to load a shared library.

Returns
true if it is currently ok to try and load a shared library into the process, false otherwise.

Implements lldb_private::DynamicLoader.

Definition at line 204 of file DynamicLoaderHexagonDYLD.cpp.

◆ ComputeLoadOffset()

addr_t DynamicLoaderHexagonDYLD::ComputeLoadOffset ( )
protected

Computes a value for m_load_offset returning the computed address on success and LLDB_INVALID_ADDRESS on failure.

Definition at line 494 of file DynamicLoaderHexagonDYLD.cpp.

Referenced by DidAttach().

◆ CreateInstance()

DynamicLoader * DynamicLoaderHexagonDYLD::CreateInstance ( lldb_private::Process process,
bool  force 
)
static

◆ DidAttach()

void DynamicLoaderHexagonDYLD::DidAttach ( )
overridevirtual

◆ DidLaunch()

void DynamicLoaderHexagonDYLD::DidLaunch ( )
overridevirtual

Called after launching a process.

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

Implements lldb_private::DynamicLoader.

Definition at line 158 of file DynamicLoaderHexagonDYLD.cpp.

◆ EntryBreakpointHit()

static bool DynamicLoaderHexagonDYLD::EntryBreakpointHit ( void *  baton,
lldb_private::StoppointCallbackContext context,
lldb::user_id_t  break_id,
lldb::user_id_t  break_loc_id 
)
staticprotected

Callback routine invoked when we hit the breakpoint on process entry.

This routine is responsible for resolving the load addresses of all dependent modules required by the inferior and setting up the rendezvous breakpoint.

◆ FindRendezvousBreakpointAddress()

lldb::addr_t DynamicLoaderHexagonDYLD::FindRendezvousBreakpointAddress ( )
protected

return the address of the Rendezvous breakpoint

◆ GetEntryPoint()

addr_t DynamicLoaderHexagonDYLD::GetEntryPoint ( )
protected

Computes a value for m_entry_point returning the computed address on success and LLDB_INVALID_ADDRESS on failure.

Definition at line 511 of file DynamicLoaderHexagonDYLD.cpp.

References lldb_private::Target::GetExecutableModule(), lldb_private::Address::GetFileAddress(), lldb_private::Module::GetObjectFile(), lldb_private::Process::GetTarget(), LLDB_INVALID_ADDRESS, m_entry_point, and lldb_private::DynamicLoader::m_process.

◆ GetPluginDescriptionStatic()

llvm::StringRef DynamicLoaderHexagonDYLD::GetPluginDescriptionStatic ( )
static

Definition at line 81 of file DynamicLoaderHexagonDYLD.cpp.

◆ GetPluginName()

llvm::StringRef DynamicLoaderHexagonDYLD::GetPluginName ( )
inlineoverridevirtual

Implements lldb_private::PluginInterface.

Definition at line 50 of file DynamicLoaderHexagonDYLD.h.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

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

Definition at line 27 of file DynamicLoaderHexagonDYLD.h.

Referenced by GetPluginName().

◆ GetSectionListFromModule()

const SectionList * DynamicLoaderHexagonDYLD::GetSectionListFromModule ( const lldb::ModuleSP  module) const
private

◆ GetStepThroughTrampolinePlan()

ThreadPlanSP DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan ( lldb_private::Thread thread,
bool  stop_others 
)
overridevirtual

◆ GetTargetExecutable()

ModuleSP DynamicLoaderHexagonDYLD::GetTargetExecutable ( )
protected

◆ GetThreadLocalData()

lldb::addr_t DynamicLoaderHexagonDYLD::GetThreadLocalData ( const lldb::ModuleSP  module,
const lldb::ThreadSP  thread,
lldb::addr_t  tls_file_addr 
)
overridevirtual

◆ Initialize()

void DynamicLoaderHexagonDYLD::Initialize ( )
static

Definition at line 74 of file DynamicLoaderHexagonDYLD.cpp.

◆ LoadAllCurrentModules()

void DynamicLoaderHexagonDYLD::LoadAllCurrentModules ( )
protected

◆ RefreshModules()

void DynamicLoaderHexagonDYLD::RefreshModules ( )
protected

◆ RendezvousBreakpointHit()

bool DynamicLoaderHexagonDYLD::RendezvousBreakpointHit ( void *  baton,
lldb_private::StoppointCallbackContext context,
lldb::user_id_t  break_id,
lldb::user_id_t  break_loc_id 
)
staticprotected

◆ SetRendezvousBreakpoint()

bool DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint ( )
protected

◆ Terminate()

void DynamicLoaderHexagonDYLD::Terminate ( )
static

Definition at line 79 of file DynamicLoaderHexagonDYLD.cpp.

◆ UnloadSections()

void DynamicLoaderHexagonDYLD::UnloadSections ( const lldb::ModuleSP  module)
overrideprotectedvirtual

◆ UpdateLoadedSections()

void DynamicLoaderHexagonDYLD::UpdateLoadedSections ( lldb::ModuleSP  module,
lldb::addr_t  link_map_addr,
lldb::addr_t  base_addr,
bool  base_addr_is_offset 
)
overrideprotectedvirtual

Updates the load address of every allocatable section in module.

Parameters
moduleThe module to traverse.
link_map_addrThe virtual address of the link map for the module.
base_addrThe virtual base address module is loaded at.

Reimplemented from lldb_private::DynamicLoader.

Definition at line 206 of file DynamicLoaderHexagonDYLD.cpp.

References lldb_private::SectionList::GetSectionAtIndex(), GetSectionListFromModule(), lldb_private::SectionList::GetSize(), lldb_private::Process::GetTarget(), m_loaded_modules, lldb_private::DynamicLoader::m_process, and lldb_private::Target::SetSectionLoadAddress().

Referenced by DidAttach().

Member Data Documentation

◆ m_dyld_bid

lldb::break_id_t DynamicLoaderHexagonDYLD::m_dyld_bid
protected

Rendezvous breakpoint.

Definition at line 63 of file DynamicLoaderHexagonDYLD.h.

Referenced by SetRendezvousBreakpoint(), and ~DynamicLoaderHexagonDYLD().

◆ m_entry_point

lldb::addr_t DynamicLoaderHexagonDYLD::m_entry_point
protected

Virtual entry address of the inferior process.

Definition at line 60 of file DynamicLoaderHexagonDYLD.h.

Referenced by GetEntryPoint().

◆ m_load_offset

lldb::addr_t DynamicLoaderHexagonDYLD::m_load_offset
protected

Virtual load address of the inferior process.

Definition at line 57 of file DynamicLoaderHexagonDYLD.h.

◆ m_loaded_modules

std::map<lldb::ModuleWP, lldb::addr_t, std::owner_less<lldb::ModuleWP> > DynamicLoaderHexagonDYLD::m_loaded_modules
protected

Loaded module list. (link map for each module)

Definition at line 67 of file DynamicLoaderHexagonDYLD.h.

Referenced by GetThreadLocalData(), LoadAllCurrentModules(), UnloadSections(), and UpdateLoadedSections().

◆ m_rendezvous

HexagonDYLDRendezvous DynamicLoaderHexagonDYLD::m_rendezvous
protected

Runtime linker rendezvous structure.

Definition at line 54 of file DynamicLoaderHexagonDYLD.h.

Referenced by GetThreadLocalData(), LoadAllCurrentModules(), RefreshModules(), RendezvousBreakpointHit(), and SetRendezvousBreakpoint().


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