LLDB mainline
|
#include <DynamicLoaderPOSIXDYLD.h>
Public Member Functions | |
DynamicLoaderPOSIXDYLD (lldb_private::Process *process) | |
~DynamicLoaderPOSIXDYLD () override | |
void | DidAttach () override |
Called after attaching a process. | |
void | DidLaunch () override |
Called after launching a process. | |
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. | |
lldb_private::Status | CanLoadImage () override |
Ask if it is ok to try and load or unload an shared library (image). | |
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. | |
llvm::StringRef | GetPluginName () override |
lldb::ModuleSP | LoadModuleAtAddress (const lldb_private::FileSpec &file, lldb::addr_t link_map_addr, lldb::addr_t base_addr, bool base_addr_is_offset) override |
Locates or creates a module given by file and updates/loads the resulting module at the virtual base address base_addr . | |
void | CalculateDynamicSaveCoreRanges (lldb_private::Process &process, std::vector< lldb_private::MemoryRegionInfo > &ranges, llvm::function_ref< bool(const lldb_private::Thread &)> save_thread_predicate) override |
Public Member Functions inherited from lldb_private::DynamicLoader | |
DynamicLoader (Process *process) | |
Construct with a process. | |
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. | |
bool | GetStopWhenImagesChange () const |
Get whether the process should stop when images change. | |
void | SetStopWhenImagesChange (bool stop) |
Set whether the process should stop when images change. | |
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. | |
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. | |
virtual bool | IsFullyInitialized () |
Return whether the dynamic loader is fully initialized and it's safe to call its APIs. | |
virtual std::optional< lldb_private::Address > | GetStartAddress () |
Return the start address in the dynamic loader module. | |
virtual void | CalculateDynamicSaveCoreRanges (lldb_private::Process &process, std::vector< lldb_private::MemoryRegionInfo > &ranges, llvm::function_ref< bool(const lldb_private::Thread &)> save_thread_predicate) |
Returns a list of memory ranges that should be saved in the core file, specific for this dynamic loader. | |
Public Member Functions inherited from lldb_private::PluginInterface | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
static void | Initialize () |
static void | Terminate () |
static llvm::StringRef | GetPluginNameStatic () |
static llvm::StringRef | GetPluginDescriptionStatic () |
static lldb_private::DynamicLoader * | CreateInstance (lldb_private::Process *process, bool force) |
Static Public Member Functions inherited from lldb_private::DynamicLoader | |
static DynamicLoader * | FindPlugin (Process *process, llvm::StringRef plugin_name) |
Find a dynamic loader plugin for a given process. | |
static lldb::ModuleSP | LoadBinaryWithUUIDAndAddress (Process *process, llvm::StringRef name, UUID uuid, lldb::addr_t value, bool value_is_offset, bool force_symbol_search, bool notify, bool set_address_in_target, bool allow_memory_image_last_resort) |
Find/load a binary into lldb given a UUID and the address where it is loaded in memory, or a slide to be applied to the file address. |
Protected Member Functions | |
bool | IsCoreFile () const |
Returns true if the process is for a core file. | |
bool | SetRendezvousBreakpoint () |
If possible sets a breakpoint on a function called by the runtime linker each time a module is loaded or unloaded. | |
void | RefreshModules () |
Helper method for RendezvousBreakpointHit. | |
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 . | |
void | UnloadSections (const lldb::ModuleSP module) override |
Removes the loaded sections from the target in module . | |
void | ProbeEntry () |
Resolves the entry point for the current inferior process and sets a breakpoint at that address. | |
virtual void | LoadAllCurrentModules () |
Helper for the entry breakpoint callback. | |
void | LoadVDSO () |
lldb::ModuleSP | LoadInterpreterModule () |
lldb::addr_t | ComputeLoadOffset () |
Computes a value for m_load_offset returning the computed address on success and LLDB_INVALID_ADDRESS on failure. | |
lldb::addr_t | GetEntryPoint () |
Computes a value for m_entry_point returning the computed address on success and LLDB_INVALID_ADDRESS on failure. | |
void | EvalSpecialModulesStatus () |
Evaluate if Aux vectors contain vDSO and LD information in case they do, read and assign the address to m_vdso_base and m_interpreter_base. | |
void | ResolveExecutableModule (lldb::ModuleSP &module_sp) |
Loads Module from inferior process. | |
bool | AlwaysRelyOnEHUnwindInfo (lldb_private::SymbolContext &sym_ctx) override |
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. | |
Protected Member Functions inherited from lldb_private::DynamicLoader | |
lldb::ModuleSP | FindModuleViaTarget (const FileSpec &file) |
lldb::ModuleSP | GetTargetExecutable () |
Checks to see if the target module has changed, updates the target accordingly and returns the target executable module. | |
void | UpdateLoadedSectionsCommon (lldb::ModuleSP module, lldb::addr_t base_addr, bool base_addr_is_offset) |
void | UnloadSectionsCommon (const lldb::ModuleSP module) |
const lldb_private::SectionList * | GetSectionListFromModule (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. | |
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. |
Protected Attributes | |
DYLDRendezvous | m_rendezvous |
Runtime linker rendezvous structure. | |
lldb::addr_t | m_load_offset |
Virtual load address of the inferior process. | |
lldb::addr_t | m_entry_point |
Virtual entry address of the inferior process. | |
std::unique_ptr< AuxVector > | m_auxv |
Auxiliary vector of the inferior process. | |
lldb::break_id_t | m_dyld_bid |
Rendezvous breakpoint. | |
lldb::addr_t | m_vdso_base |
Contains AT_SYSINFO_EHDR, which means a vDSO has been mapped to the address space. | |
lldb::addr_t | m_interpreter_base |
Contains AT_BASE, which means a dynamic loader has been mapped to the address space. | |
std::weak_ptr< lldb_private::Module > | m_interpreter_module |
Contains the pointer to the interpret module, if loaded. | |
bool | m_initial_modules_added |
Indicates whether the initial set of modules was reported added. | |
Protected Attributes inherited from lldb_private::DynamicLoader | |
Process * | m_process |
The process that this dynamic loader plug-in is tracking. |
Private Member Functions | |
DynamicLoaderPOSIXDYLD (const DynamicLoaderPOSIXDYLD &)=delete | |
const DynamicLoaderPOSIXDYLD & | operator= (const DynamicLoaderPOSIXDYLD &)=delete |
void | SetLoadedModule (const lldb::ModuleSP &module_sp, lldb::addr_t link_map_addr) |
void | UnloadModule (const lldb::ModuleSP &module_sp) |
std::optional< lldb::addr_t > | GetLoadedModuleLinkAddr (const lldb::ModuleSP &module_sp) |
Private Attributes | |
std::map< lldb::ModuleWP, lldb::addr_t, std::owner_less< lldb::ModuleWP > > | m_loaded_modules |
Loaded module list. | |
llvm::sys::RWMutex | m_loaded_modules_rw_mutex |
Definition at line 23 of file DynamicLoaderPOSIXDYLD.h.
DynamicLoaderPOSIXDYLD::DynamicLoaderPOSIXDYLD | ( | lldb_private::Process * | process | ) |
Definition at line 69 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::DynamicLoader::DynamicLoader(), LLDB_INVALID_ADDRESS, LLDB_INVALID_BREAK_ID, m_auxv, m_dyld_bid, m_entry_point, m_initial_modules_added, m_interpreter_base, m_load_offset, m_rendezvous, and m_vdso_base.
Referenced by CreateInstance(), DynamicLoaderPOSIXDYLD(), EntryBreakpointHit(), Initialize(), operator=(), and RendezvousBreakpointHit().
|
override |
Definition at line 77 of file DynamicLoaderPOSIXDYLD.cpp.
References LLDB_INVALID_BREAK_ID, m_dyld_bid, and lldb_private::DynamicLoader::m_process.
|
privatedelete |
References DynamicLoaderPOSIXDYLD().
|
overrideprotectedvirtual |
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.
The CFI instructions from the eh_frame section are normally only valid at call sites – places where a program could throw an exception and need to unwind out. But some Modules may be known to the system as having reliable eh_frame information at all call sites. This would be the case if the Module's contents are largely hand-written assembly with hand-written eh_frame information. Normally when unwinding from a function at the beginning of a stack unwind lldb will examine the assembly instructions to understand how the stack frame is set up and where saved registers are stored. But with hand-written assembly this is not reliable enough – we need to consult those function's hand-written eh_frame information.
Reimplemented from lldb_private::DynamicLoader.
Definition at line 922 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::SymbolContext::function, lldb_private::Function::GetAddress(), lldb_private::Symbol::GetAddressRef(), lldb_private::Address::GetModule(), and lldb_private::SymbolContext::symbol.
|
override |
Definition at line 998 of file DynamicLoaderPOSIXDYLD.cpp.
References AddLinkMapSections(), AddThreadLocalMemoryRegions(), lldb_private::ThreadList::GetSize(), lldb_private::ThreadList::GetThreadAtIndex(), and lldb_private::Process::GetThreadList().
|
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.
Implements lldb_private::DynamicLoader.
Definition at line 187 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::Status.
|
protected |
Computes a value for m_load_offset returning the computed address on success and LLDB_INVALID_ADDRESS on failure.
Definition at line 738 of file DynamicLoaderPOSIXDYLD.cpp.
References GetEntryPoint(), lldb_private::ObjectFile::GetEntryPointAddress(), lldb_private::Address::GetFileAddress(), lldb_private::Address::IsValid(), LLDB_INVALID_ADDRESS, m_load_offset, and lldb_private::DynamicLoader::m_process.
Referenced by DidAttach(), and DidLaunch().
|
static |
Definition at line 51 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::DynamicLoader::DynamicLoader(), DynamicLoaderPOSIXDYLD(), lldb_private::Target::GetArchitecture(), lldb_private::Process::GetTarget(), and lldb_private::ArchSpec::GetTriple().
Referenced by Initialize().
|
overridevirtual |
Called after attaching a process.
Allow DynamicLoader plug-ins to execute some code after attaching to a process.
Implements lldb_private::DynamicLoader.
Definition at line 84 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::ModuleList::Append(), ComputeLoadOffset(), lldb_private::DynamicLoader, EvalSpecialModulesStatus(), lldb_private::GetLog(), lldb_private::DynamicLoader::GetTargetExecutable(), LLDB_INVALID_ADDRESS, LLDB_INVALID_PROCESS_ID, LLDB_LOGF, LoadAllCurrentModules(), m_auxv, lldb_private::DynamicLoader::m_process, m_rendezvous, lldb_private::ModuleList::Modules(), ProbeEntry(), ResolveExecutableModule(), SetRendezvousBreakpoint(), and UpdateLoadedSections().
|
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 155 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::ModuleList::Append(), ComputeLoadOffset(), lldb_private::DynamicLoader, EvalSpecialModulesStatus(), lldb_private::GetLog(), lldb_private::DynamicLoader::GetTargetExecutable(), LLDB_INVALID_ADDRESS, LLDB_LOGF, LoadVDSO(), m_auxv, lldb_private::DynamicLoader::m_process, ProbeEntry(), SetRendezvousBreakpoint(), and UpdateLoadedSections().
|
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.
Definition at line 265 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::DynamicLoader, DynamicLoaderPOSIXDYLD(), lldb_private::Target::GetBreakpointByID(), lldb_private::Process::GetID(), lldb_private::GetLog(), lldb_private::Process::GetTarget(), LLDB_INVALID_PROCESS_ID, LLDB_LOGF, LoadAllCurrentModules(), lldb_private::DynamicLoader::m_process, and SetRendezvousBreakpoint().
Referenced by ProbeEntry().
|
protected |
Evaluate if Aux vectors contain vDSO and LD information in case they do, read and assign the address to m_vdso_base and m_interpreter_base.
Definition at line 764 of file DynamicLoaderPOSIXDYLD.cpp.
References AuxVector::AUXV_AT_BASE, AuxVector::AUXV_AT_SYSINFO_EHDR, m_auxv, m_interpreter_base, and m_vdso_base.
Referenced by DidAttach(), and DidLaunch().
|
protected |
Computes a value for m_entry_point returning the computed address on success and LLDB_INVALID_ADDRESS on failure.
Definition at line 774 of file DynamicLoaderPOSIXDYLD.cpp.
References AuxVector::AUXV_AT_ENTRY, lldb_private::ArchSpec::GetMachine(), LLDB_INVALID_ADDRESS, m_auxv, m_entry_point, lldb_private::DynamicLoader::m_process, and lldb_private::DynamicLoader::ReadUnsignedIntWithSizeInBytes().
Referenced by ComputeLoadOffset(), and ProbeEntry().
|
private |
Definition at line 201 of file DynamicLoaderPOSIXDYLD.cpp.
References m_loaded_modules, and m_loaded_modules_rw_mutex.
Referenced by GetThreadLocalData().
|
static |
Definition at line 46 of file DynamicLoaderPOSIXDYLD.cpp.
Referenced by Initialize().
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 56 of file DynamicLoaderPOSIXDYLD.h.
References GetPluginNameStatic().
|
inlinestatic |
Definition at line 33 of file DynamicLoaderPOSIXDYLD.h.
Referenced by ProcessElfCore::GetDynamicLoader(), GetPluginName(), and Initialize().
|
overridevirtual |
Provides a plan to step through the dynamic loader trampoline for the current state of thread.
[in] | stop_others | Whether the plan should be set to stop other threads. |
Implements lldb_private::DynamicLoader.
Definition at line 535 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::Mangled::ePreferMangled, lldb::eSymbolTypeCode, lldb_private::ModuleList::FindSymbolsWithNameAndType(), lldb_private::SymbolContext::GetFunctionOrSymbolAddress(), lldb_private::Target::GetImages(), lldb_private::Address::GetLoadAddress(), lldb_private::Symbol::GetMangled(), lldb_private::Mangled::GetName(), lldb_private::SymbolContextList::GetSize(), lldb_private::ConstString::GetStringRef(), lldb_private::StackFrame::GetSymbolContext(), lldb_private::Symbol::IsTrampoline(), LLDB_INVALID_ADDRESS, and lldb_private::SymbolContext::symbol.
|
overridevirtual |
Retrieves the per-module TLS block for a given thread.
[in] | module | The module to query TLS data for. |
[in] | thread | The specific thread to query TLS data for. |
Reimplemented from lldb_private::DynamicLoader.
Definition at line 798 of file DynamicLoaderPOSIXDYLD.cpp.
References DYLDRendezvous::ThreadInfo::dtv_offset, DYLDRendezvous::ThreadInfo::dtv_slot_size, lldb_private::DynamicLoader, GetLoadedModuleLinkAddr(), lldb_private::GetLog(), LLDB_INVALID_ADDRESS, LLDB_LOGF, m_rendezvous, DYLDRendezvous::ThreadInfo::modid_offset, lldb_private::DynamicLoader::ReadPointer(), lldb_private::DynamicLoader::ReadUnsignedIntWithSizeInBytes(), DYLDRendezvous::ThreadInfo::tls_offset, and DYLDRendezvous::ThreadInfo::valid.
|
static |
Definition at line 39 of file DynamicLoaderPOSIXDYLD.cpp.
References CreateInstance(), DynamicLoaderPOSIXDYLD(), GetPluginDescriptionStatic(), GetPluginNameStatic(), Initialize(), and lldb_private::PluginManager::RegisterPlugin().
Referenced by Initialize().
|
protected |
Returns true if the process is for a core file.
Definition at line 935 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::DynamicLoader::m_process.
Referenced by ProbeEntry(), and SetRendezvousBreakpoint().
|
protectedvirtual |
Helper for the entry breakpoint callback.
Resolves the load addresses of all dependent modules.
Definition at line 679 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::ModuleList::Append(), lldb_private::DynamicLoader, lldb_private::GetLog(), lldb_private::DynamicLoader::GetTargetExecutable(), lldb_private::Debugger::GetThreadPool(), LLDB_LOG, LLDB_LOGF, LoadModuleAtAddress(), LoadVDSO(), m_initial_modules_added, lldb_private::DynamicLoader::m_process, m_rendezvous, and SetLoadedModule().
Referenced by DidAttach(), and EntryBreakpointHit().
|
protected |
Definition at line 613 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::ModuleList::Append(), lldb_private::DynamicLoader, lldb_private::MemoryRegionInfo::eYes, lldb_private::Status::Fail(), lldb_private::Target::GetArchitecture(), lldb_private::ConstString::GetCString(), lldb_private::GetLog(), lldb_private::MemoryRegionInfo::GetMapped(), lldb_private::MemoryRegionInfo::GetName(), lldb_private::Target::GetOrCreateModule(), lldb_private::ConstString::IsEmpty(), LLDB_INVALID_ADDRESS, LLDB_LOG, m_interpreter_base, m_interpreter_module, lldb_private::DynamicLoader::m_process, lldb_private::Target::ModulesDidLoad(), and UpdateLoadedSections().
Referenced by SetRendezvousBreakpoint().
|
overridevirtual |
Locates or creates a module given by file
and updates/loads the resulting module at the virtual base address base_addr
.
Note that this calls Target::GetOrCreateModule with notify being false, so it is necessary to call Target::ModulesDidLoad afterwards.
Reimplemented from lldb_private::DynamicLoader.
Definition at line 647 of file DynamicLoaderPOSIXDYLD.cpp.
References error(), lldb_private::MemoryRegionInfo::GetMapped(), lldb_private::MemoryRegionInfo::GetName(), lldb_private::MemoryRegionInfo::GetRange(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::ConstString::GetStringRef(), lldb_private::ConstString::IsEmpty(), lldb_private::DynamicLoader::LoadModuleAtAddress(), and lldb_private::DynamicLoader::m_process.
Referenced by LoadAllCurrentModules(), and RefreshModules().
|
protected |
Definition at line 592 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::DynamicLoader, lldb_private::Status::Fail(), lldb_private::Range< B, S >::GetByteSize(), lldb_private::GetLog(), lldb_private::MemoryRegionInfo::GetRange(), LLDB_INVALID_ADDRESS, LLDB_LOG, lldb_private::DynamicLoader::m_process, m_vdso_base, and UpdateLoadedSections().
Referenced by DidLaunch(), and LoadAllCurrentModules().
|
privatedelete |
References DynamicLoaderPOSIXDYLD().
|
protected |
Resolves the entry point for the current inferior process and sets a breakpoint at that address.
Definition at line 224 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::DynamicLoader, EntryBreakpointHit(), GetEntryPoint(), lldb_private::GetLog(), IsCoreFile(), LLDB_INVALID_ADDRESS, LLDB_INVALID_PROCESS_ID, LLDB_LOGF, lldb_private::DynamicLoader::m_process, lldb_private::Breakpoint::SetBreakpointKind(), lldb_private::Breakpoint::SetCallback(), and lldb_private::Breakpoint::SetOneShot().
Referenced by DidAttach(), and DidLaunch().
|
protected |
Helper method for RendezvousBreakpointHit.
Updates LLDB's current set of loaded modules.
Definition at line 420 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::ModuleList::Append(), lldb_private::ModuleList::AppendIfNeeded(), lldb_private::ModuleList::FindFirstModule(), lldb_private::DynamicLoader::GetTargetExecutable(), lldb_private::Debugger::GetThreadPool(), LoadModuleAtAddress(), m_initial_modules_added, m_interpreter_base, m_interpreter_module, lldb_private::DynamicLoader::m_process, m_rendezvous, lldb_private::ModuleList::Remove(), SetLoadedModule(), and UnloadSections().
Referenced by RendezvousBreakpointHit().
|
staticprotected |
Callback routine which updates the current list of loaded modules based on the information supplied by the runtime linker.
Definition at line 391 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::DynamicLoader, DynamicLoaderPOSIXDYLD(), lldb_private::Process::GetID(), lldb_private::GetLog(), lldb_private::DynamicLoader::GetStopWhenImagesChange(), LLDB_INVALID_PROCESS_ID, LLDB_LOGF, lldb_private::DynamicLoader::m_process, and RefreshModules().
Referenced by SetRendezvousBreakpoint().
|
protected |
Loads Module from inferior process.
Definition at line 875 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::ModuleSpec::Dump(), lldb_private::DynamicLoader, lldb_private::eLoadDependentsNo, error(), lldb_private::ProcessInfo::GetArchitecture(), lldb_private::StreamString::GetData(), lldb_private::Target::GetDefaultExecutableSearchPaths(), lldb_private::ProcessInfo::GetExecutableFile(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), LLDB_LOGF, and lldb_private::DynamicLoader::m_process.
Referenced by DidAttach().
|
private |
Definition at line 189 of file DynamicLoaderPOSIXDYLD.cpp.
References m_loaded_modules, and m_loaded_modules_rw_mutex.
Referenced by LoadAllCurrentModules(), RefreshModules(), and UpdateLoadedSections().
|
protected |
If possible sets a breakpoint on a function called by the runtime linker each time a module is loaded or unloaded.
Definition at line 313 of file DynamicLoaderPOSIXDYLD.cpp.
References lldb_private::FileSpecList::Append(), lldb_private::Target::CreateBreakpoint(), lldb_private::DynamicLoader, lldb::eLanguageTypeC, lldb_private::eLazyBoolNo, lldb_private::GetLog(), IsCoreFile(), LLDB_INVALID_BREAK_ID, LLDB_INVALID_PROCESS_ID, LLDB_LOG, LoadInterpreterModule(), m_dyld_bid, lldb_private::DynamicLoader::m_process, m_rendezvous, lldb_private::Target::RemoveBreakpointByID(), and RendezvousBreakpointHit().
Referenced by DidAttach(), DidLaunch(), and EntryBreakpointHit().
|
static |
Definition at line 44 of file DynamicLoaderPOSIXDYLD.cpp.
|
private |
Definition at line 195 of file DynamicLoaderPOSIXDYLD.cpp.
References m_loaded_modules, and m_loaded_modules_rw_mutex.
Referenced by UnloadSections().
|
overrideprotectedvirtual |
Removes the loaded sections from the target in module
.
module | The module to traverse. |
Reimplemented from lldb_private::DynamicLoader.
Definition at line 218 of file DynamicLoaderPOSIXDYLD.cpp.
References UnloadModule(), and lldb_private::DynamicLoader::UnloadSectionsCommon().
Referenced by RefreshModules().
|
overrideprotectedvirtual |
Updates the load address of every allocatable section in module
.
module | The module to traverse. |
link_map_addr | The virtual address of the link map for the module . |
base_addr | The virtual base address module is loaded at. |
Reimplemented from lldb_private::DynamicLoader.
Definition at line 209 of file DynamicLoaderPOSIXDYLD.cpp.
References SetLoadedModule(), and lldb_private::DynamicLoader::UpdateLoadedSectionsCommon().
Referenced by DidAttach(), DidLaunch(), LoadInterpreterModule(), and LoadVDSO().
|
protected |
Auxiliary vector of the inferior process.
Definition at line 80 of file DynamicLoaderPOSIXDYLD.h.
Referenced by DidAttach(), DidLaunch(), DynamicLoaderPOSIXDYLD(), EvalSpecialModulesStatus(), and GetEntryPoint().
|
protected |
Rendezvous breakpoint.
Definition at line 83 of file DynamicLoaderPOSIXDYLD.h.
Referenced by DynamicLoaderPOSIXDYLD(), SetRendezvousBreakpoint(), and ~DynamicLoaderPOSIXDYLD().
|
protected |
Virtual entry address of the inferior process.
Definition at line 77 of file DynamicLoaderPOSIXDYLD.h.
Referenced by DynamicLoaderPOSIXDYLD(), and GetEntryPoint().
|
protected |
Indicates whether the initial set of modules was reported added.
Definition at line 110 of file DynamicLoaderPOSIXDYLD.h.
Referenced by DynamicLoaderPOSIXDYLD(), LoadAllCurrentModules(), and RefreshModules().
|
protected |
Contains AT_BASE, which means a dynamic loader has been mapped to the address space.
Definition at line 91 of file DynamicLoaderPOSIXDYLD.h.
Referenced by DynamicLoaderPOSIXDYLD(), EvalSpecialModulesStatus(), LoadInterpreterModule(), and RefreshModules().
|
protected |
Contains the pointer to the interpret module, if loaded.
Definition at line 94 of file DynamicLoaderPOSIXDYLD.h.
Referenced by LoadInterpreterModule(), and RefreshModules().
|
protected |
Virtual load address of the inferior process.
Definition at line 74 of file DynamicLoaderPOSIXDYLD.h.
Referenced by ComputeLoadOffset(), and DynamicLoaderPOSIXDYLD().
|
private |
Loaded module list.
(link map for each module) This may be accessed in a multi-threaded context. Use the accessor methods to access m_loaded_modules safely.
Definition at line 184 of file DynamicLoaderPOSIXDYLD.h.
Referenced by GetLoadedModuleLinkAddr(), SetLoadedModule(), and UnloadModule().
|
private |
Definition at line 185 of file DynamicLoaderPOSIXDYLD.h.
Referenced by GetLoadedModuleLinkAddr(), SetLoadedModule(), and UnloadModule().
|
protected |
Runtime linker rendezvous structure.
Definition at line 71 of file DynamicLoaderPOSIXDYLD.h.
Referenced by DidAttach(), DynamicLoaderPOSIXDYLD(), GetThreadLocalData(), LoadAllCurrentModules(), RefreshModules(), and SetRendezvousBreakpoint().
|
protected |
Contains AT_SYSINFO_EHDR, which means a vDSO has been mapped to the address space.
Definition at line 87 of file DynamicLoaderPOSIXDYLD.h.
Referenced by DynamicLoaderPOSIXDYLD(), EvalSpecialModulesStatus(), and LoadVDSO().