|
LLDB mainline
|
A plug-in interface definition class for dynamic loaders. More...
#include "lldb/Target/DynamicLoader.h"
Classes | |
| struct | BinarySpec |
| A binary to find and load into a Target. More... | |
Public Member Functions | |
| DynamicLoader (Process *process) | |
| Construct with a process. | |
| virtual void | DidAttach ()=0 |
| Called after attaching a process. | |
| virtual void | DidLaunch ()=0 |
| Called after launching 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 lldb::ThreadPlanSP | GetStepThroughTrampolinePlan (Thread &thread, bool stop_others)=0 |
| Provides a plan to step through the dynamic loader trampoline for the current state of thread. | |
| virtual void | FindEquivalentSymbols (const 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 Status | CanLoadImage ()=0 |
| Ask if it is ok to try and load or unload an shared library (image). | |
| 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. | |
| virtual lldb::addr_t | GetThreadLocalData (const lldb::ModuleSP module, const lldb::ThreadSP thread, lldb::addr_t tls_file_addr) |
| Retrieves the per-module TLS block for a given thread. | |
| 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. | |
| virtual bool | GetSharedCacheInformation (lldb::addr_t &base_address, UUID &uuid, LazyBool &using_shared_cache, LazyBool &private_shared_cache, lldb_private::FileSpec &shared_cache_path, std::optional< uint64_t > &size) |
| 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 |
| virtual llvm::StringRef | GetPluginName ()=0 |
| PluginInterface (const PluginInterface &)=delete | |
| PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
| static DynamicLoader * | FindPlugin (Process *process, llvm::StringRef plugin_name) |
| Find a dynamic loader plugin for a given process. | |
| static llvm::Expected< lldb::ModuleSP > | LocateAndLoadBinary (Process *process, BinarySpec &bin_spec) |
| Find a binary and load it into a Target. | |
| static void | LocateBinaries (Process *process, llvm::MutableArrayRef< BinarySpec > bin_specs) |
| Search for a batch of binaries, without mutating the Target. | |
| static llvm::Expected< lldb::ModuleSP > | LoadBinaryInTarget (Process *process, BinarySpec &bin_spec) |
| Add a binary that LocateBinaries searched for to the Target, and set its load address. | |
Protected Member Functions | |
| lldb::ModuleSP | FindModuleViaTarget (const ModuleSpec &module_spec) |
| Find a module in the target that matches the given module spec. | |
| lldb::ModuleSP | GetTargetExecutable () |
| Checks to see if the target module has changed, updates the target accordingly and returns the target executable module. | |
| virtual void | UpdateLoadedSections (lldb::ModuleSP module, lldb::addr_t link_map_addr, lldb::addr_t base_addr, bool base_addr_is_offset) |
Updates the load address of every allocatable section in module. | |
| void | UpdateLoadedSectionsCommon (lldb::ModuleSP module, lldb::addr_t base_addr, bool base_addr_is_offset) |
| virtual void | UnloadSections (const lldb::ModuleSP module) |
Removes the loaded sections from the target in module. | |
| 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) |
Protected Attributes | |
| Process * | m_process |
| The process that this dynamic loader plug-in is tracking. | |
A plug-in interface definition class for dynamic loaders.
Dynamic loader plug-ins track image (shared library) loading and unloading. The class is initialized given a live process that is halted at its entry point or just after attaching.
Dynamic loader plug-ins can track the process by registering callbacks using the: Process::RegisterNotificationCallbacks (const Notifications&) function.
Breakpoints can also be set in the process which can register functions that get called using: Process::BreakpointSetCallback (lldb::user_id_t, BreakpointHitCallback, void *). These breakpoint callbacks return a boolean value that indicates if the process should continue or halt and should return the global setting for this using: DynamicLoader::StopWhenImagesChange() const.
Definition at line 58 of file DynamicLoader.h.
| DynamicLoader::DynamicLoader | ( | Process * | process | ) |
Construct with a process.
Definition at line 66 of file DynamicLoader.cpp.
References m_process.
Referenced by DynamicLoaderDarwinKernel::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), DynamicLoaderMacOSXDYLD::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), DynamicLoaderStatic::CreateInstance(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), lldb_private::wasm::DynamicLoaderWasmDYLD::CreateInstance(), lldb_private::DynamicLoaderDarwin::DynamicLoaderDarwin(), DynamicLoaderDarwinKernel::DynamicLoaderDarwinKernel(), DynamicLoaderFreeBSDKernel::DynamicLoaderFreeBSDKernel(), DynamicLoaderHexagonDYLD::DynamicLoaderHexagonDYLD(), DynamicLoaderPOSIXDYLD::DynamicLoaderPOSIXDYLD(), DynamicLoaderStatic::DynamicLoaderStatic(), lldb_private::wasm::DynamicLoaderWasmDYLD::DynamicLoaderWasmDYLD(), lldb_private::DynamicLoaderWindowsDYLD::DynamicLoaderWindowsDYLD(), and FindPlugin().
|
inlinevirtual |
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 in DynamicLoaderPOSIXDYLD, and lldb_private::DynamicLoaderDarwin.
Definition at line 188 of file DynamicLoader.h.
Referenced by lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame().
|
inlinevirtual |
Returns a list of memory ranges that should be saved in the core file, specific for this dynamic loader.
For example, an implementation of this function can save the thread local data of a given thread.
Definition at line 422 of file DynamicLoader.h.
Referenced by SaveDynamicLoaderSections().
|
pure virtual |
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.
Implemented in DynamicLoaderDarwinKernel, DynamicLoaderFreeBSDKernel, DynamicLoaderHexagonDYLD, DynamicLoaderMacOS, DynamicLoaderMacOSXDYLD, DynamicLoaderPOSIXDYLD, DynamicLoaderStatic, lldb_private::DynamicLoaderWindowsDYLD, and lldb_private::wasm::DynamicLoaderWasmDYLD.
Referenced by PlatformPOSIX::EvaluateLibdlExpression().
|
pure virtual |
Called after attaching a process.
Allow DynamicLoader plug-ins to execute some code after attaching to a process.
Implemented in DynamicLoaderDarwinKernel, DynamicLoaderFreeBSDKernel, DynamicLoaderHexagonDYLD, DynamicLoaderPOSIXDYLD, DynamicLoaderStatic, lldb_private::DynamicLoaderDarwin, lldb_private::DynamicLoaderWindowsDYLD, and lldb_private::wasm::DynamicLoaderWasmDYLD.
Referenced by lldb_private::Process::CompleteAttach(), and lldb_private::Process::LoadCore().
|
pure virtual |
Called after launching a process.
Allow DynamicLoader plug-ins to execute some code after the process has stopped for the first time on launch.
Implemented in DynamicLoaderDarwinKernel, DynamicLoaderFreeBSDKernel, DynamicLoaderHexagonDYLD, DynamicLoaderPOSIXDYLD, DynamicLoaderStatic, lldb_private::DynamicLoaderDarwin, lldb_private::DynamicLoaderWindowsDYLD, and lldb_private::wasm::DynamicLoaderWasmDYLD.
|
inlinevirtual |
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.
If you want to set a breakpoint on one of these symbols, you really need to set it on all the equivalent symbols.
| [in] | original_symbol | The symbol for which we are finding equivalences. |
| [in] | module_list | The set of modules in which to search. |
| [out] | equivalent_symbols | The equivalent symbol list - any equivalent symbols found are appended to this list. |
Reimplemented in lldb_private::DynamicLoaderDarwin.
Definition at line 152 of file DynamicLoader.h.
|
protected |
Find a module in the target that matches the given module spec.
Definition at line 159 of file DynamicLoader.cpp.
References lldb_private::ModuleList::FindFirstModule(), lldb_private::Target::GetImages(), lldb_private::Target::GetOrCreateModule(), lldb_private::ModuleSpec::GetUUID(), lldb_private::UUID::IsValid(), and m_process.
Referenced by LoadModuleAtAddress().
|
static |
Find a dynamic loader plugin for a given process.
Scans the installed DynamicLoader plug-ins and tries to find an instance that can be used to track image changes in process.
| [in] | process | The process for which to try and locate a dynamic loader plug-in instance. |
| [in] | plugin_name | An optional name of a specific dynamic loader plug-in that should be used. If empty, pick the best plug-in. |
Definition at line 42 of file DynamicLoader.cpp.
References DynamicLoader(), lldb_private::PluginManager::GetDynamicLoaderCreateCallbackForPluginName(), and lldb_private::PluginManager::GetDynamicLoaderCreateCallbacks().
Referenced by lldb_private::Process::GetDynamicLoader(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetDynamicLoader(), lldb_private::ProcessWindows::GetDynamicLoader(), ProcessElfCore::GetDynamicLoader(), ProcessFreeBSDKernelCore::GetDynamicLoader(), ProcessKDP::GetDynamicLoader(), and ProcessMachCore::GetDynamicLoader().
|
protected |
Definition at line 148 of file DynamicLoader.cpp.
References lldb_private::ObjectFile::GetSectionList().
Referenced by UnloadSectionsCommon().
|
inlinevirtual |
Get information about the shared cache for a process, if possible.
On some systems (e.g. Darwin based systems), a set of libraries that are common to most processes may be put in a single region of memory and mapped into every process, this is called the shared cache, as a performance optimization.
Many targets will not have the concept of a shared cache.
Depending on how the DynamicLoader gathers information about the shared cache, it may be able to only return basic information - like the UUID of the cache - or it may be able to return additional information about the cache.
| [out] | base_address | The base address (load address) of the shared cache. LLDB_INVALID_ADDRESS if it cannot be determined. |
| [out] | uuid | The UUID of the shared cache, if it can be determined. If the UUID cannot be fetched, IsValid() will be false. |
| [out] | using_shared_cache | If this process is using a shared cache. If unknown, eLazyBoolCalculate is returned. |
| [out] | private_shared_cache | A LazyBool indicating whether this process is using a private shared cache. If this information cannot be fetched, eLazyBoolCalculate. |
| [out] | shared_cache_path | A FileSpec representing the shared cache path being run in the inferior process. |
Reimplemented in DynamicLoaderMacOS, and DynamicLoaderMacOSXDYLD.
Definition at line 389 of file DynamicLoader.h.
References lldb_private::FileSpec::Clear(), lldb_private::UUID::Clear(), lldb_private::eLazyBoolCalculate, and LLDB_INVALID_ADDRESS.
Referenced by lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::PlatformDarwin::GetModuleFromSharedCaches(), and ObjectFileMachO::GetProcessSharedCacheUUID().
|
inlinevirtual |
Return the start address in the dynamic loader module.
This is the address the process will begin executing with process launch --stop-at-entry.
Reimplemented in lldb_private::DynamicLoaderDarwin.
Definition at line 413 of file DynamicLoader.h.
|
pure virtual |
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. |
Implemented in DynamicLoaderDarwinKernel, DynamicLoaderFreeBSDKernel, DynamicLoaderHexagonDYLD, DynamicLoaderPOSIXDYLD, DynamicLoaderStatic, lldb_private::DynamicLoaderDarwin, lldb_private::DynamicLoaderWindowsDYLD, and lldb_private::wasm::DynamicLoaderWasmDYLD.
Referenced by lldb_private::ThreadPlanStepThrough::LookForPlanToStepThroughFromCurrentPC().
| bool DynamicLoader::GetStopWhenImagesChange | ( | ) | const |
Get whether the process should stop when images change.
When images (executables and shared libraries) get loaded or unloaded, often debug sessions will want to try and resolve or unresolve breakpoints that are set in these images. Any breakpoints set by DynamicLoader plug-in instances should return this value to ensure consistent debug session behaviour.
Definition at line 71 of file DynamicLoader.cpp.
References m_process.
Referenced by DynamicLoaderDarwinKernel::BreakpointHit(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), DynamicLoaderHexagonDYLD::RendezvousBreakpointHit(), and DynamicLoaderPOSIXDYLD::RendezvousBreakpointHit().
|
protected |
Checks to see if the target module has changed, updates the target accordingly and returns the target executable module.
Definition at line 79 of file DynamicLoader.cpp.
References lldb_private::eLoadDependentsNo, lldb_private::Target::GetExecutableModule(), lldb_private::Target::GetExecutableModulePointer(), lldb_private::Target::GetOrCreateModule(), lldb_private::FileSystem::Instance(), m_process, and lldb_private::Target::SetExecutableModule().
Referenced by DynamicLoaderPOSIXDYLD::DidAttach(), lldb_private::DynamicLoaderWindowsDYLD::DidAttach(), DynamicLoaderPOSIXDYLD::DidLaunch(), lldb_private::DynamicLoaderWindowsDYLD::DidLaunch(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), and DynamicLoaderPOSIXDYLD::RefreshModules().
|
inlinevirtual |
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 in DynamicLoaderHexagonDYLD, DynamicLoaderPOSIXDYLD, and lldb_private::DynamicLoaderDarwin.
Definition at line 204 of file DynamicLoader.h.
References LLDB_INVALID_ADDRESS.
Referenced by lldb_private::Thread::GetThreadLocalData().
|
inlinevirtual |
Return whether the dynamic loader is fully initialized and it's safe to call its APIs.
On some systems (e.g. Darwin based systems), lldb will get notified by the dynamic loader before it itself finished initializing and it's not safe to call certain APIs or SPIs.
Reimplemented in DynamicLoaderMacOS, and DynamicLoaderMacOSXDYLD.
Definition at line 408 of file DynamicLoader.h.
Referenced by lldb_private::Thread::SafeToCallFunctions().
|
static |
Add a binary that LocateBinaries searched for to the Target, and set its load address.
This mutates the Target and may read the process' memory, so it has to be called for one binary at a time. Call it over the batch in the order the batch was built in: that order decides the Target's module order, which binary gets to set the Target's architecture, and the order in which messages reach the user.
Whether a failure is worth telling the user about is left to the caller, which knows whether it went looking for a binary that has to be there. A symbol server's word on a binary that was found anyway is reported here.
| [in] | process | The process to add this binary to. |
| [in,out] | bin_spec | A binary that LocateBinaries has searched for. |
Definition at line 352 of file DynamicLoader.cpp.
References lldb_private::DynamicLoader::BinarySpec::allow_memory_image_last_resort, lldb_private::ModuleList::Append(), lldb_private::ModuleList::AppendIfNeeded(), lldb_private::DynamicLoader, error(), lldb_private::DynamicLoader::BinarySpec::error, lldb_private::Target::GetArchitecture(), lldb_private::UUID::GetAsString(), lldb_private::Debugger::GetAsyncErrorStream(), GetBinaryDescription(), GetBinaryNotFoundMessage(), lldb_private::Target::GetDebugger(), lldb_private::Target::GetImages(), lldb_private::GetLog(), lldb_private::Process::GetTarget(), lldb_private::ArchSpec::IsValid(), LLDB_INVALID_ADDRESS, LLDB_LOG, LLDB_LOGF, lldb_private::DynamicLoader::BinarySpec::memory_module_sp, lldb_private::DynamicLoader::BinarySpec::module_sp, lldb_private::Target::ModulesDidLoad(), lldb_private::DynamicLoader::BinarySpec::name, lldb_private::DynamicLoader::BinarySpec::notify, ReadUnnamedMemoryModule(), lldb_private::DynamicLoader::BinarySpec::set_address_in_target, lldb_private::Target::SetArchitecture(), lldb_private::Status::takeError(), lldb_private::DynamicLoader::BinarySpec::uuid, lldb_private::DynamicLoader::BinarySpec::value, and lldb_private::DynamicLoader::BinarySpec::value_is_offset.
Referenced by ObjectFileMachO::LoadCoreFileImages(), and LocateAndLoadBinary().
|
virtual |
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 in DynamicLoaderPOSIXDYLD, and lldb_private::wasm::DynamicLoaderWasmDYLD.
Definition at line 175 of file DynamicLoader.cpp.
References lldb_private::DynamicLoader, FindModuleViaTarget(), lldb_private::Target::GetArchitecture(), lldb_private::GetLog(), LLDB_LOG_ERROR, m_process, lldb_private::ModuleSpec::SetLoadAddress(), and UpdateLoadedSections().
Referenced by DynamicLoaderHexagonDYLD::LoadAllCurrentModules(), DynamicLoaderPOSIXDYLD::LoadModuleAtAddress(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModuleAtAddress(), lldb_private::wasm::DynamicLoaderWasmDYLD::LoadModuleAtAddress(), and DynamicLoaderHexagonDYLD::RefreshModules().
|
protected |
Definition at line 463 of file DynamicLoader.cpp.
References m_process.
Referenced by DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), and DynamicLoaderFreeBSDKernel::LoadKernelModules().
|
static |
Find a binary and load it into a Target.
Given a UUID, search for a binary and load it at the address provided, or with the slide applied, or at the file address unslid.
Given an address, try to read the binary out of memory, get the UUID, find the file if possible and load it unslid, or add the memory module.
May force an expensive search on the host system to find the binary by UUID. To load more than one binary, use LocateBinaries and LoadBinaryInTarget instead: the search is the expensive part, and those let all of the searching happen before any of the binaries are added to the Target.
| [in] | process | The process to add this binary to. |
| [in,out] | bin_spec | The binary to find and load, with its input fields filled in by the caller. |
Definition at line 438 of file DynamicLoader.cpp.
References LoadBinaryInTarget(), and LocateBinaries().
Referenced by ProcessMachCore::LoadBinariesViaMetadata(), ProcessMachCore::LoadBinaryViaLowmemUUID(), and lldb_private::process_gdb_remote::ProcessGDBRemote::LoadStubBinaries().
|
static |
Search for a batch of binaries, without mutating the Target.
The entries are searched for independently, and stay in the order they were given in. A binary that cannot be found leaves its BinarySpec::module_sp empty and has no effect on the others. Its BinarySpec::memory_module_sp is set only when the binary's header had to be read out of memory to get the UUID. Nothing is registered with the Target, see LoadBinaryInTarget.
| [in] | process | The process the binaries belong to. Used to read a binary's header out of memory when its UUID isn't known, and otherwise only read from. |
| [in,out] | bin_specs | The binaries to search for, with their input fields filled in by the caller. |
Definition at line 321 of file DynamicLoader.cpp.
References FindBinaryUUIDInMemory(), FinishSearch(), lldb_private::Target::GetDefaultDebugFileSearchPaths(), lldb_private::TargetProperties::GetParallelModuleLoad(), lldb_private::Process::GetTarget(), lldb_private::SymbolLocator::Locate(), and PrepareSearch().
Referenced by ObjectFileMachO::LoadCoreFileImages(), and LocateAndLoadBinary().
|
inlinevirtual |
Helper function that can be used to detect when a process has called exec and is now a new and different process.
This can be called when necessary to try and detect the exec. The process might be able to answer this question, but sometimes it might not be able and the dynamic loader often knows what the program entry point is. So the process and the dynamic loader can work together to detect this.
Reimplemented in DynamicLoaderMacOS, and DynamicLoaderMacOSXDYLD.
Definition at line 96 of file DynamicLoader.h.
Referenced by lldb_private::StopInfoMachException::CreateStopReasonWithMachException().
|
protected |
Definition at line 454 of file DynamicLoader.cpp.
References error(), LLDB_INVALID_ADDRESS, and m_process.
Referenced by DynamicLoaderHexagonDYLD::GetThreadLocalData(), and DynamicLoaderPOSIXDYLD::GetThreadLocalData().
|
protected |
Definition at line 443 of file DynamicLoader.cpp.
References error(), and m_process.
Referenced by DynamicLoaderPOSIXDYLD::GetEntryPoint(), and DynamicLoaderPOSIXDYLD::GetThreadLocalData().
| void DynamicLoader::SetStopWhenImagesChange | ( | bool | stop | ) |
Set whether the process should stop when images change.
When images (executables and shared libraries) get loaded or unloaded, often debug sessions will want to try and resolve or unresolve breakpoints that are set in these images. The default is set so that the process stops when images change, but this can be overridden using this function callback.
| [in] | stop | Boolean value that indicates whether the process should stop when images change. |
Definition at line 75 of file DynamicLoader.cpp.
References m_process.
|
protectedvirtual |
Removes the loaded sections from the target in module.
| module | The module to traverse. |
Reimplemented in DynamicLoaderHexagonDYLD, and DynamicLoaderPOSIXDYLD.
Definition at line 130 of file DynamicLoader.cpp.
References UnloadSectionsCommon().
Referenced by lldb_private::DynamicLoaderDarwin::UnloadAllImages(), and lldb_private::DynamicLoaderDarwin::UnloadImages().
|
protected |
Definition at line 134 of file DynamicLoader.cpp.
References lldb_private::SectionList::GetSectionAtIndex(), GetSectionListFromModule(), lldb_private::SectionList::GetSize(), m_process, and lldb_private::Target::SetSectionUnloaded().
Referenced by lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule(), DynamicLoaderPOSIXDYLD::UnloadSections(), and UnloadSections().
|
protectedvirtual |
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 in DynamicLoaderHexagonDYLD, and DynamicLoaderPOSIXDYLD.
Definition at line 116 of file DynamicLoader.cpp.
References UpdateLoadedSectionsCommon().
Referenced by lldb_private::DynamicLoaderWindowsDYLD::DidAttach(), lldb_private::DynamicLoaderWindowsDYLD::DidLaunch(), LoadModuleAtAddress(), and lldb_private::wasm::DynamicLoaderWasmDYLD::LoadModuleAtAddress().
|
protected |
Definition at line 122 of file DynamicLoader.cpp.
Referenced by lldb_private::DynamicLoaderWindowsDYLD::OnLoadModule(), lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule(), DynamicLoaderPOSIXDYLD::UpdateLoadedSections(), and UpdateLoadedSections().
|
protected |
The process that this dynamic loader plug-in is tracking.
Definition at line 481 of file DynamicLoader.h.
Referenced by DynamicLoaderMacOS::AddBinaries(), DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfosAddress(), lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), lldb_private::DynamicLoaderDarwin::AlwaysRelyOnEHUnwindInfo(), DynamicLoaderMacOS::CanLoadImage(), DynamicLoaderDarwinKernel::Clear(), lldb_private::DynamicLoaderDarwin::Clear(), DynamicLoaderMacOS::ClearDYLDHandoverBreakpoint(), DynamicLoaderMacOS::ClearNotificationBreakpoint(), DynamicLoaderMacOSXDYLD::ClearNotificationBreakpoint(), DynamicLoaderPOSIXDYLD::ComputeLoadOffset(), DynamicLoaderDarwinKernel::DidAttach(), DynamicLoaderHexagonDYLD::DidAttach(), DynamicLoaderPOSIXDYLD::DidAttach(), lldb_private::DynamicLoaderDarwin::DidAttach(), lldb_private::DynamicLoaderWindowsDYLD::DidAttach(), lldb_private::wasm::DynamicLoaderWasmDYLD::DidAttach(), DynamicLoaderDarwinKernel::DidLaunch(), DynamicLoaderPOSIXDYLD::DidLaunch(), lldb_private::DynamicLoaderDarwin::DidLaunch(), lldb_private::DynamicLoaderWindowsDYLD::DidLaunch(), DynamicLoaderMacOS::DoClear(), DynamicLoaderMacOSXDYLD::DoClear(), DynamicLoaderMacOS::DoInitialImageFetch(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), DynamicLoader(), DynamicLoaderPOSIXDYLD::EntryBreakpointHit(), FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), DynamicLoaderMacOS::GetDyldLockVariableAddressFromModule(), DynamicLoaderHexagonDYLD::GetEntryPoint(), DynamicLoaderPOSIXDYLD::GetEntryPoint(), lldb_private::DynamicLoaderWindowsDYLD::GetLoadAddress(), DynamicLoaderMacOS::GetNotificationFuncAddrFromImageInfos(), lldb_private::DynamicLoaderDarwin::GetPThreadLibraryModule(), DynamicLoaderMacOS::GetSharedCacheInformation(), DynamicLoaderMacOSXDYLD::GetSharedCacheInformation(), lldb_private::DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan(), GetStopWhenImagesChange(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), GetTargetExecutable(), DynamicLoaderHexagonDYLD::GetThreadLocalData(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), DynamicLoaderPOSIXDYLD::IsCoreFile(), DynamicLoaderMacOS::IsFullyInitialized(), DynamicLoaderHexagonDYLD::LoadAllCurrentModules(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), DynamicLoaderPOSIXDYLD::LoadModuleAtAddress(), LoadModuleAtAddress(), lldb_private::wasm::DynamicLoaderWasmDYLD::LoadModuleAtAddress(), LoadOperatingSystemPlugin(), DynamicLoaderPOSIXDYLD::LoadVDSO(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::DynamicLoaderWindowsDYLD::OnLoadModule(), lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule(), DynamicLoaderDarwinKernel::ParseKextSummaries(), lldb_private::DynamicLoaderDarwin::PreloadModulesFromImageInfos(), DynamicLoaderDarwinKernel::PrivateInitialize(), lldb_private::DynamicLoaderDarwin::PrivateInitialize(), lldb_private::DynamicLoaderDarwin::PrivateProcessStateChanged(), DynamicLoaderPOSIXDYLD::ProbeEntry(), DynamicLoaderMacOS::ProcessDidExec(), DynamicLoaderMacOSXDYLD::ProcessDidExec(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), DynamicLoaderMacOSXDYLD::ReadImageInfos(), DynamicLoaderDarwinKernel::ReadKextSummaries(), DynamicLoaderDarwinKernel::ReadKextSummaryHeader(), DynamicLoaderMacOSXDYLD::ReadMachHeader(), ReadPointer(), ReadUnsignedIntWithSizeInBytes(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(), DynamicLoaderHexagonDYLD::RendezvousBreakpointHit(), DynamicLoaderPOSIXDYLD::RendezvousBreakpointHit(), DynamicLoaderPOSIXDYLD::ResolveExecutableModule(), DynamicLoaderMacOS::SetDYLDHandoverBreakpoint(), DynamicLoaderMacOS::SetNotificationBreakpoint(), DynamicLoaderMacOSXDYLD::SetNotificationBreakpoint(), DynamicLoaderDarwinKernel::SetNotificationBreakpointIfNeeded(), DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), SetStopWhenImagesChange(), lldb_private::DynamicLoaderDarwin::UnloadAllImages(), lldb_private::DynamicLoaderDarwin::UnloadImages(), lldb_private::DynamicLoaderDarwin::UnloadModuleSections(), DynamicLoaderHexagonDYLD::UnloadSections(), UnloadSectionsCommon(), lldb_private::DynamicLoaderDarwin::UpdateDYLDImageInfoFromNewImageInfo(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), lldb_private::DynamicLoaderDarwin::UpdateImageLoadAddress(), DynamicLoaderHexagonDYLD::UpdateLoadedSections(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules(), DynamicLoaderHexagonDYLD::~DynamicLoaderHexagonDYLD(), DynamicLoaderMacOS::~DynamicLoaderMacOS(), DynamicLoaderMacOSXDYLD::~DynamicLoaderMacOSXDYLD(), and DynamicLoaderPOSIXDYLD::~DynamicLoaderPOSIXDYLD().