LLDB mainline
Public Member Functions | Static Public Member Functions | List of all members
lldb_private::wasm::DynamicLoaderWasmDYLD Class Reference

#include <DynamicLoaderWasmDYLD.h>

Inheritance diagram for lldb_private::wasm::DynamicLoaderWasmDYLD:
Inheritance graph
[legend]

Public Member Functions

 DynamicLoaderWasmDYLD (Process *process)
 
void DidAttach () override
 DynamicLoader.
 
void DidLaunch () override
 Called after launching a process.
 
Status CanLoadImage () override
 Ask if it is ok to try and load or unload an shared library (image).
 
lldb::ThreadPlanSP GetStepThroughTrampolinePlan (Thread &thread, bool stop) override
 Provides a plan to step through the dynamic loader trampoline for the current state of thread.
 
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.
 
llvm::StringRef GetPluginName () override
 PluginInterface protocol.
 
- Public Member Functions inherited from lldb_private::DynamicLoader
 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 (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)
 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::AddressGetStartAddress ()
 Return the start address in the dynamic loader module.
 
- 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 DynamicLoaderCreateInstance (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.
 
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.
 

Additional Inherited Members

- 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.
 
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::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)
 
- Protected Attributes inherited from lldb_private::DynamicLoader
Processm_process
 The process that this dynamic loader plug-in is tracking.
 

Detailed Description

Definition at line 17 of file DynamicLoaderWasmDYLD.h.

Constructor & Destructor Documentation

◆ DynamicLoaderWasmDYLD()

DynamicLoaderWasmDYLD::DynamicLoaderWasmDYLD ( Process process)

Definition at line 26 of file DynamicLoaderWasmDYLD.cpp.

Member Function Documentation

◆ CanLoadImage()

Status lldb_private::wasm::DynamicLoaderWasmDYLD::CanLoadImage ( )
inlineoverridevirtual

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 33 of file DynamicLoaderWasmDYLD.h.

◆ CreateInstance()

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

◆ DidAttach()

void DynamicLoaderWasmDYLD::DidAttach ( )
overridevirtual

◆ DidLaunch()

void lldb_private::wasm::DynamicLoaderWasmDYLD::DidLaunch ( )
inlineoverridevirtual

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 32 of file DynamicLoaderWasmDYLD.h.

◆ GetPluginDescriptionStatic()

llvm::StringRef DynamicLoaderWasmDYLD::GetPluginDescriptionStatic ( )
static

Definition at line 34 of file DynamicLoaderWasmDYLD.cpp.

Referenced by Initialize().

◆ GetPluginName()

llvm::StringRef lldb_private::wasm::DynamicLoaderWasmDYLD::GetPluginName ( )
inlineoverridevirtual

PluginInterface protocol.

Implements lldb_private::PluginInterface.

Definition at line 45 of file DynamicLoaderWasmDYLD.h.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

static llvm::StringRef lldb_private::wasm::DynamicLoaderWasmDYLD::GetPluginNameStatic ( )
inlinestatic

Definition at line 24 of file DynamicLoaderWasmDYLD.h.

Referenced by GetPluginName(), and Initialize().

◆ GetStepThroughTrampolinePlan()

ThreadPlanSP DynamicLoaderWasmDYLD::GetStepThroughTrampolinePlan ( Thread thread,
bool  stop_others 
)
overridevirtual

Provides a plan to step through the dynamic loader trampoline for the current state of thread.

Parameters
[in]stop_othersWhether the plan should be set to stop other threads.
Returns
A pointer to the plan (caller owned) or NULL if we are not at such a trampoline.

Implements lldb_private::DynamicLoader.

Definition at line 63 of file DynamicLoaderWasmDYLD.cpp.

◆ Initialize()

void DynamicLoaderWasmDYLD::Initialize ( )
static

◆ LoadModuleAtAddress()

lldb::ModuleSP DynamicLoaderWasmDYLD::LoadModuleAtAddress ( const lldb_private::FileSpec file,
lldb::addr_t  link_map_addr,
lldb::addr_t  base_addr,
bool  base_addr_is_offset 
)
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 68 of file DynamicLoaderWasmDYLD.cpp.

References lldb_private::ModuleList::AppendIfNeeded(), lldb_private::Target::GetImages(), lldb_private::Process::GetTarget(), lldb_private::DynamicLoader::LoadModuleAtAddress(), lldb_private::DynamicLoader::m_process, lldb_private::Process::ReadModuleFromMemory(), and lldb_private::DynamicLoader::UpdateLoadedSections().

◆ Terminate()

static void lldb_private::wasm::DynamicLoaderWasmDYLD::Terminate ( )
inlinestatic

Definition at line 22 of file DynamicLoaderWasmDYLD.h.


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