LLDB mainline
|
Generic Wasm object file reader. More...
#include <ObjectFileWasm.h>
Classes | |
struct | section_info |
Public Member Functions | |
std::optional< FileSpec > | GetExternalDebugInfoFileSpec () |
A Wasm module that has external DWARF debug information should contain a custom section named "external_debug_info", whose payload is an UTF-8 encoded string that points to a Wasm module that contains the debug information for this module. | |
llvm::StringRef | GetPluginName () override |
PluginInterface protocol. | |
bool | ParseHeader () override |
ObjectFile Protocol. | |
lldb::ByteOrder | GetByteOrder () const override |
Gets whether endian swapping should occur when extracting data from this object file. | |
bool | IsExecutable () const override |
Tells whether this object file is capable of being the main executable for a process. | |
uint32_t | GetAddressByteSize () const override |
Gets the address size in bytes for the current object file. | |
AddressClass | GetAddressClass (lldb::addr_t file_addr) override |
Get the address type given a file address in an object file. | |
void | ParseSymtab (lldb_private::Symtab &symtab) override |
Parse the symbol table into the provides symbol table object. | |
bool | IsStripped () override |
Detect if this object file has been stripped of local symbols. | |
void | CreateSections (SectionList &unified_section_list) override |
void | Dump (Stream *s) override |
Dump a description of this object to a Stream. | |
ArchSpec | GetArchitecture () override |
Get the ArchSpec for this object file. | |
UUID | GetUUID () override |
Gets the UUID for this object file. | |
uint32_t | GetDependentModules (FileSpecList &files) override |
Extract the dependent modules from an object file. | |
Type | CalculateType () override |
The object file should be able to calculate its type by looking at its file header and possibly the sections or other data in the object file. | |
Strata | CalculateStrata () override |
The object file should be able to calculate the strata of the object file. | |
bool | SetLoadAddress (lldb_private::Target &target, lldb::addr_t value, bool value_is_offset) override |
Sets the load address for an entire module, assuming a rigid slide of sections, if possible in the implementation. | |
lldb_private::Address | GetBaseAddress () override |
Returns base address of this object file. | |
Public Member Functions inherited from lldb_private::ObjectFile | |
ObjectFile (const lldb::ModuleSP &module_sp, const FileSpec *file_spec_ptr, lldb::offset_t file_offset, lldb::offset_t length, lldb::DataBufferSP data_sp, lldb::offset_t data_offset) | |
Construct with a parent module, offset, and header data. | |
ObjectFile (const lldb::ModuleSP &module_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, lldb::DataBufferSP data_sp) | |
~ObjectFile () override | |
Destructor. | |
virtual void | Dump (Stream *s)=0 |
Dump a description of this object to a Stream. | |
virtual bool | isA (const void *ClassID) const |
virtual uint32_t | GetAddressByteSize () const =0 |
Gets the address size in bytes for the current object file. | |
virtual AddressClass | GetAddressClass (lldb::addr_t file_addr) |
Get the address type given a file address in an object file. | |
virtual uint32_t | GetDependentModules (FileSpecList &file_list)=0 |
Extract the dependent modules from an object file. | |
virtual bool | IsExecutable () const =0 |
Tells whether this object file is capable of being the main executable for a process. | |
virtual lldb::addr_t | GetFileOffset () const |
Returns the offset into a file at which this object resides. | |
virtual lldb::addr_t | GetByteSize () const |
virtual FileSpec & | GetFileSpec () |
Get accessor to the object file specification. | |
virtual const FileSpec & | GetFileSpec () const |
Get const accessor to the object file specification. | |
virtual ArchSpec | GetArchitecture ()=0 |
Get the ArchSpec for this object file. | |
virtual SectionList * | GetSectionList (bool update_module_section_list=true) |
Gets the section list for the currently selected architecture (and object for archives). | |
virtual void | CreateSections (SectionList &unified_section_list)=0 |
virtual void | SectionFileAddressesChanged () |
Notify the ObjectFile that the file addresses in the Sections for this module have been changed. | |
Symtab * | GetSymtab () |
Gets the symbol table for the currently selected architecture (and object for archives). | |
virtual void | ParseSymtab (Symtab &symtab)=0 |
Parse the symbol table into the provides symbol table object. | |
virtual void | RelocateSection (lldb_private::Section *section) |
Perform relocations on the section if necessary. | |
virtual Symbol * | ResolveSymbolForAddress (const Address &so_addr, bool verify_unique) |
Appends a Symbol for the specified so_addr to the symbol table. | |
virtual bool | IsStripped ()=0 |
Detect if this object file has been stripped of local symbols. | |
virtual void | ClearSymtab () |
Frees the symbol table. | |
virtual UUID | GetUUID ()=0 |
Gets the UUID for this object file. | |
virtual lldb_private::FileSpecList | GetReExportedLibraries () |
Gets the file spec list of libraries re-exported by this object file. | |
virtual bool | SetLoadAddress (Target &target, lldb::addr_t value, bool value_is_offset) |
Sets the load address for an entire module, assuming a rigid slide of sections, if possible in the implementation. | |
virtual lldb::ByteOrder | GetByteOrder () const =0 |
Gets whether endian swapping should occur when extracting data from this object file. | |
virtual bool | ParseHeader ()=0 |
Attempts to parse the object header. | |
virtual bool | AllowAssemblyEmulationUnwindPlans () |
Returns if the function bounds for symbols in this symbol file are likely accurate. | |
virtual lldb_private::Address | GetImageInfoAddress (Target *target) |
Similar to Process::GetImageInfoAddress(). | |
virtual lldb_private::Address | GetEntryPointAddress () |
Returns the address of the Entry Point in this object file - if the object file doesn't have an entry point (because it is not an executable file) then an invalid address is returned. | |
virtual lldb_private::Address | GetBaseAddress () |
Returns base address of this object file. | |
virtual uint32_t | GetNumThreadContexts () |
virtual std::string | GetIdentifierString () |
Some object files may have an identifier string embedded in them, e.g. | |
virtual lldb_private::AddressableBits | GetAddressableBits () |
Some object files may have the number of bits used for addressing embedded in them, e.g. | |
virtual bool | GetCorefileMainBinaryInfo (lldb::addr_t &value, bool &value_is_offset, UUID &uuid, ObjectFile::BinaryType &type) |
When the ObjectFile is a core file, lldb needs to locate the "binary" in the core file. | |
virtual bool | GetCorefileThreadExtraInfos (std::vector< lldb::tid_t > &tids) |
Get metadata about threads from the corefile. | |
virtual lldb::RegisterContextSP | GetThreadContextAtIndex (uint32_t idx, lldb_private::Thread &thread) |
virtual Type | CalculateType ()=0 |
The object file should be able to calculate its type by looking at its file header and possibly the sections or other data in the object file. | |
virtual void | SetType (Type type) |
In cases where the type can't be calculated (elf files), this routine allows someone to explicitly set it. | |
virtual Strata | CalculateStrata ()=0 |
The object file should be able to calculate the strata of the object file. | |
virtual llvm::VersionTuple | GetVersion () |
Get the object file version numbers. | |
virtual llvm::VersionTuple | GetMinimumOSVersion () |
Get the minimum OS version this object file can run on. | |
virtual llvm::VersionTuple | GetSDKVersion () |
Get the SDK OS version this object file was built with. | |
virtual bool | GetIsDynamicLinkEditor () |
Return true if this file is a dynamic link editor (dyld) | |
Type | GetType () |
Strata | GetStrata () |
size_t | GetData (lldb::offset_t offset, size_t length, DataExtractor &data) const |
size_t | CopyData (lldb::offset_t offset, size_t length, void *dst) const |
virtual size_t | ReadSectionData (Section *section, lldb::offset_t section_offset, void *dst, size_t dst_len) |
virtual size_t | ReadSectionData (Section *section, DataExtractor §ion_data) |
virtual size_t | GetSectionDataSize (Section *section) |
bool | IsInMemory () const |
Returns true if the object file exists only in memory. | |
virtual llvm::StringRef | StripLinkerSymbolAnnotations (llvm::StringRef symbol_name) const |
virtual bool | CanTrustAddressRanges () |
Can we trust the address ranges accelerator associated with this object file to be complete. | |
virtual std::vector< LoadableData > | GetLoadableData (Target &target) |
Loads this objfile to memory. | |
virtual std::unique_ptr< CallFrameInfo > | CreateCallFrameInfo () |
Creates a plugin-specific call frame info. | |
virtual bool | LoadCoreFileImages (lldb_private::Process &process) |
Load binaries listed in a corefile. | |
uint32_t | GetCacheHash () |
Get a hash that can be used for caching object file releated information. | |
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 |
Public Member Functions inherited from lldb_private::ModuleChild | |
ModuleChild (const lldb::ModuleSP &module_sp) | |
Construct with owning module. | |
~ModuleChild () | |
Destructor. | |
const ModuleChild & | operator= (const ModuleChild &rhs) |
Assignment operator. | |
lldb::ModuleSP | GetModule () const |
Get const accessor for the module pointer. | |
void | SetModule (const lldb::ModuleSP &module_sp) |
Set accessor for the module pointer. | |
Static Public Member Functions | |
static void | Initialize () |
static void | Terminate () |
static llvm::StringRef | GetPluginNameStatic () |
static const char * | GetPluginDescriptionStatic () |
static ObjectFile * | CreateInstance (const lldb::ModuleSP &module_sp, lldb::DataBufferSP data_sp, lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t file_offset, lldb::offset_t length) |
static ObjectFile * | CreateMemoryInstance (const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr) |
static size_t | GetModuleSpecifications (const FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, ModuleSpecList &specs) |
Static Public Member Functions inherited from lldb_private::ObjectFile | |
static lldb::ObjectFileSP | FindPlugin (const lldb::ModuleSP &module_sp, const FileSpec *file_spec, lldb::offset_t file_offset, lldb::offset_t file_size, lldb::DataBufferSP &data_sp, lldb::offset_t &data_offset) |
Find a ObjectFile plug-in that can parse file_spec. | |
static lldb::ObjectFileSP | FindPlugin (const lldb::ModuleSP &module_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, lldb::WritableDataBufferSP file_data_sp) |
Find a ObjectFile plug-in that can parse a file in memory. | |
static size_t | GetModuleSpecifications (const FileSpec &file, lldb::offset_t file_offset, lldb::offset_t file_size, ModuleSpecList &specs, lldb::DataBufferSP data_sp=lldb::DataBufferSP()) |
static size_t | GetModuleSpecifications (const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t file_size, lldb_private::ModuleSpecList &specs) |
static bool | IsObjectFile (lldb_private::FileSpec file_spec) |
static bool | SplitArchivePathWithObject (llvm::StringRef path_with_object, lldb_private::FileSpec &archive_file, lldb_private::ConstString &archive_object, bool must_exist) |
Split a path into a file path with object name. | |
static lldb::WritableDataBufferSP | ReadMemory (const lldb::ProcessSP &process_sp, lldb::addr_t addr, size_t byte_size) |
static lldb::SymbolType | GetSymbolTypeFromName (llvm::StringRef name, lldb::SymbolType symbol_type_hint=lldb::eSymbolTypeUndefined) |
static lldb::DataBufferSP | MapFileData (const FileSpec &file, uint64_t Size, uint64_t Offset) |
Private Types | |
typedef struct lldb_private::wasm::ObjectFileWasm::section_info | section_info_t |
Private Member Functions | |
ObjectFileWasm (const lldb::ModuleSP &module_sp, lldb::DataBufferSP data_sp, lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t offset, lldb::offset_t length) | |
ObjectFileWasm (const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP header_data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr) | |
DataExtractor | ReadImageData (lldb::offset_t offset, uint32_t size) |
Read a range of bytes from the Wasm module. | |
bool | DecodeNextSection (lldb::offset_t *offset_ptr) |
Wasm section decoding routines. | |
bool | DecodeSections () |
void | DumpSectionHeader (llvm::raw_ostream &ostream, const section_info_t &sh) |
Wasm section header dump routines. | |
void | DumpSectionHeaders (llvm::raw_ostream &ostream) |
Private Attributes | |
std::vector< section_info_t > | m_sect_infos |
ArchSpec | m_arch |
UUID | m_uuid |
static char | ID |
LLVM RTTI support. | |
static bool | classof (const ObjectFile *obj) |
bool | isA (const void *ClassID) const override |
Additional Inherited Members | |
Public Types inherited from lldb_private::ObjectFile | |
enum | Type { eTypeInvalid = 0 , eTypeCoreFile , eTypeExecutable , eTypeDebugInfo , eTypeDynamicLinker , eTypeObjectFile , eTypeSharedLibrary , eTypeStubLibrary , eTypeJIT , eTypeUnknown } |
enum | Strata { eStrataInvalid = 0 , eStrataUnknown , eStrataUser , eStrataKernel , eStrataRawImage , eStrataJIT } |
enum | BinaryType { eBinaryTypeInvalid = 0 , eBinaryTypeUnknown , eBinaryTypeKernel , eBinaryTypeUser , eBinaryTypeStandalone } |
If we have a corefile binary hint, this enum specifies the binary type which we can use to select the correct DynamicLoader plugin. More... | |
Static Public Attributes inherited from lldb_private::ObjectFile | |
static char | ID |
Protected Member Functions inherited from lldb_private::ObjectFile | |
bool | SetModulesArchitecture (const ArchSpec &new_arch) |
Sets the architecture for a module. | |
Protected Attributes inherited from lldb_private::ObjectFile | |
FileSpec | m_file |
Type | m_type |
Strata | m_strata |
lldb::addr_t | m_file_offset |
The offset in bytes into the file, or the address in memory. | |
lldb::addr_t | m_length |
The length of this object file if it is known (can be zero if length is unknown or can't be determined). | |
DataExtractor | m_data |
The data for this object file so things can be parsed lazily. | |
lldb::ProcessWP | m_process_wp |
const lldb::addr_t | m_memory_addr |
Set if the object file only exists in memory. | |
std::unique_ptr< lldb_private::SectionList > | m_sections_up |
std::unique_ptr< lldb_private::Symtab > | m_symtab_up |
std::unique_ptr< llvm::once_flag > | m_symtab_once_up |
We need a llvm::once_flag that we can use to avoid locking the module lock and deadlocking LLDB. | |
std::optional< uint32_t > | m_cache_hash |
Protected Attributes inherited from lldb_private::ModuleChild | |
lldb::ModuleWP | m_module_wp |
The Module that owns the object that inherits from this class. | |
Static Protected Attributes inherited from lldb_private::ObjectFile | |
static size_t | g_initial_bytes_to_read = 512 |
The number of bytes to read when going through the plugins. | |
Generic Wasm object file reader.
This class provides a generic wasm32 reader plugin implementing the ObjectFile protocol.
Definition at line 23 of file ObjectFileWasm.h.
|
private |
|
private |
Definition at line 231 of file ObjectFileWasm.cpp.
References lldb_private::ObjectFile::m_data, and lldb_private::DataExtractor::SetAddressByteSize().
|
private |
Definition at line 239 of file ObjectFileWasm.cpp.
|
inlineoverridevirtual |
The object file should be able to calculate the strata of the object file.
Many object files for platforms might be for either user space debugging or for kernel debugging. If your object file subclass can figure this out, it will help with debugger plug-in selection when it comes time to debug.
Implements lldb_private::ObjectFile.
Definition at line 98 of file ObjectFileWasm.h.
References lldb_private::ObjectFile::eStrataUser.
|
inlineoverridevirtual |
The object file should be able to calculate its type by looking at its file header and possibly the sections or other data in the object file.
The file type is used in the debugger to help select the correct plug- ins for the job at hand, so this is important to get right. If any eTypeXXX definitions do not match up with the type of file you are loading, please feel free to add a new enumeration value.
Implements lldb_private::ObjectFile.
Definition at line 96 of file ObjectFileWasm.h.
References lldb_private::ObjectFile::eTypeSharedLibrary.
|
inlinestatic |
Definition at line 61 of file ObjectFileWasm.h.
References ID, and lldb_private::ObjectFile::isA().
|
static |
Definition at line 92 of file ObjectFileWasm.cpp.
References lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), LLDB_LOGF, lldb_private::ObjectFile::MapFileData(), lldb_private::Object, and ValidateModuleHeader().
Referenced by Initialize(), and Terminate().
|
static |
Definition at line 144 of file ObjectFileWasm.cpp.
References ValidateModuleHeader().
Referenced by Initialize().
|
overridevirtual |
Implements lldb_private::ObjectFile.
Definition at line 290 of file ObjectFileWasm.cpp.
References lldb_private::SectionList::AddSection(), DecodeSections(), lldb::eSectionTypeCode, lldb::eSectionTypeOther, lldb_private::ModuleChild::GetModule(), GetSectionTypeFromName(), lldb_private::ObjectFile::IsInMemory(), m_sect_infos, and lldb_private::ObjectFile::m_sections_up.
|
private |
Wasm section decoding routines.
Definition at line 159 of file ObjectFileWasm.cpp.
References lldb_private::DataExtractor::GetAsLLVM(), GetWasmString(), m_sect_infos, and ReadImageData().
Referenced by DecodeSections().
|
private |
Definition at line 208 of file ObjectFileWasm.cpp.
References DecodeNextSection(), lldb_private::ObjectFile::IsInMemory(), kWasmHeaderSize, and lldb_private::ObjectFile::m_memory_addr.
Referenced by CreateSections(), and SetLoadAddress().
|
overridevirtual |
Dump a description of this object to a Stream.
Dump a description of the current contents of this object to the supplied stream s. The dumping should include the section list if it has been parsed, and the symbol table if it has been parsed.
[in] | s | The stream to which to dump the object description. |
Implements lldb_private::ObjectFile.
Definition at line 434 of file ObjectFileWasm.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::FileSpec::Dump(), lldb_private::SectionList::Dump(), DumpSectionHeaders(), GetArchitecture(), lldb_private::ArchSpec::GetArchitectureName(), lldb_private::Stream::GetIndentLevel(), lldb_private::ModuleChild::GetModule(), lldb_private::ObjectFile::GetSectionList(), lldb_private::Stream::Indent(), lldb_private::ObjectFile::m_file, and UINT32_MAX.
|
private |
Wasm section header dump routines.
Definition at line 459 of file ObjectFileWasm.cpp.
References lldb_private::ConstString::GetStringRef(), lldb_private::wasm::ObjectFileWasm::section_info::id, lldb_private::wasm::ObjectFileWasm::section_info::name, lldb_private::wasm::ObjectFileWasm::section_info::offset, and lldb_private::wasm::ObjectFileWasm::section_info::size.
Referenced by DumpSectionHeaders().
|
private |
Definition at line 467 of file ObjectFileWasm.cpp.
References DumpSectionHeader(), and m_sect_infos.
Referenced by Dump().
|
inlineoverridevirtual |
Gets the address size in bytes for the current object file.
Implements lldb_private::ObjectFile.
Definition at line 74 of file ObjectFileWasm.h.
References lldb_private::ArchSpec::GetAddressByteSize(), and m_arch.
Referenced by ReadImageData().
|
inlineoverridevirtual |
Get the address type given a file address in an object file.
Many binary file formats know what kinds This is primarily for ARM binaries, though it can be applied to any executable file format that supports different opcode types within the same binary. ARM binaries support having both ARM and Thumb within the same executable container. We need to be able to get
Reimplemented from lldb_private::ObjectFile.
Definition at line 78 of file ObjectFileWasm.h.
References lldb_private::eInvalid.
|
inlineoverridevirtual |
Get the ArchSpec for this object file.
Implements lldb_private::ObjectFile.
Definition at line 90 of file ObjectFileWasm.h.
References m_arch.
Referenced by Dump().
|
inlineoverridevirtual |
Returns base address of this object file.
This also sometimes referred to as the "preferred load address" or the "image base address". Addresses within object files are often expressed relative to this base. If this address corresponds to a specific section (usually the first byte of the first section) then the returned address will have this section set. Otherwise, the address will just have the offset member filled in, indicating that this represents a file address.
Reimplemented from lldb_private::ObjectFile.
Definition at line 103 of file ObjectFileWasm.h.
References lldb_private::ObjectFile::IsInMemory(), and lldb_private::ObjectFile::m_memory_addr.
|
inlineoverridevirtual |
Gets whether endian swapping should occur when extracting data from this object file.
Implements lldb_private::ObjectFile.
Definition at line 68 of file ObjectFileWasm.h.
References lldb_private::ArchSpec::GetByteOrder(), and m_arch.
Referenced by ReadImageData().
|
inlineoverridevirtual |
Extract the dependent modules from an object file.
If an object file has information about which other images it depends on (such as shared libraries), this function will provide the list. Since many executables or shared libraries may depend on the same files, FileSpecList::AppendIfUnique(const FileSpec &) should be used to make sure any files that are added are not already in the list.
[out] | file_list | A list of file specification objects that gets dependent files appended to. |
Implements lldb_private::ObjectFile.
Definition at line 94 of file ObjectFileWasm.h.
std::optional< FileSpec > ObjectFileWasm::GetExternalDebugInfoFileSpec | ( | ) |
A Wasm module that has external DWARF debug information should contain a custom section named "external_debug_info", whose payload is an UTF-8 encoded string that points to a Wasm module that contains the debug information for this module.
Definition at line 416 of file ObjectFileWasm.cpp.
References lldb_private::DataExtractor::GetAsLLVM(), GetWasmString(), m_sect_infos, and ReadImageData().
Referenced by lldb_private::wasm::SymbolVendorWasm::CreateInstance(), and IsStripped().
|
static |
Definition at line 219 of file ObjectFileWasm.cpp.
References lldb_private::ModuleSpecList::Append(), and ValidateModuleHeader().
Referenced by Initialize().
|
inlinestatic |
Definition at line 29 of file ObjectFileWasm.h.
Referenced by Initialize().
|
inlineoverridevirtual |
PluginInterface protocol.
Implements lldb_private::PluginInterface.
Definition at line 52 of file ObjectFileWasm.h.
References GetPluginNameStatic().
|
inlinestatic |
Definition at line 28 of file ObjectFileWasm.h.
Referenced by GetPluginName(), and Initialize().
|
inlineoverridevirtual |
Gets the UUID for this object file.
If the object file format contains a UUID, the value should be returned. Else ObjectFile instances should return the MD5 checksum of all of the bytes for the object file (or memory for memory based object files).
Implements lldb_private::ObjectFile.
Definition at line 92 of file ObjectFileWasm.h.
References m_uuid.
Referenced by lldb_private::wasm::SymbolVendorWasm::CreateInstance().
|
static |
Definition at line 81 of file ObjectFileWasm.cpp.
References CreateInstance(), CreateMemoryInstance(), GetModuleSpecifications(), GetPluginDescriptionStatic(), GetPluginNameStatic(), and lldb_private::PluginManager::RegisterPlugin().
|
inlineoverridevirtual |
Reimplemented from lldb_private::ObjectFile.
Definition at line 58 of file ObjectFileWasm.h.
References ID, and lldb_private::ObjectFile::isA().
|
inlineoverridevirtual |
Tells whether this object file is capable of being the main executable for a process.
Implements lldb_private::ObjectFile.
Definition at line 72 of file ObjectFileWasm.h.
|
inlineoverridevirtual |
Detect if this object file has been stripped of local symbols.
Detect if this object file has been stripped of local symbols.
Implements lldb_private::ObjectFile.
Definition at line 84 of file ObjectFileWasm.h.
References GetExternalDebugInfoFileSpec().
|
overridevirtual |
ObjectFile Protocol.
Implements lldb_private::ObjectFile.
Definition at line 246 of file ObjectFileWasm.cpp.
|
overridevirtual |
Parse the symbol table into the provides symbol table object.
Symbol table parsing will be done once when this function is called by each object file plugin. All of the necessary locks will already be acquired before this function is called and the symbol table object to populate is supplied as an argument and doesn't need to be created by each plug-in.
The | symbol table to populate. |
Implements lldb_private::ObjectFile.
Definition at line 251 of file ObjectFileWasm.cpp.
|
private |
Read a range of bytes from the Wasm module.
Definition at line 390 of file ObjectFileWasm.cpp.
References GetAddressByteSize(), GetByteOrder(), lldb_private::ObjectFile::GetByteSize(), lldb_private::ObjectFile::m_file, lldb_private::ObjectFile::m_process_wp, lldb_private::ObjectFile::MapFileData(), lldb_private::DataExtractor::SetByteOrder(), and lldb_private::DataExtractor::SetData().
Referenced by DecodeNextSection(), and GetExternalDebugInfoFileSpec().
|
overridevirtual |
Sets the load address for an entire module, assuming a rigid slide of sections, if possible in the implementation.
In WebAssembly, linear memory is disjointed from code space. The VM can load multiple instances of a module, which logically share the same code. We represent a wasm32 code address with 64-bits, like: 63 32 31 0 +------------—+------------—+
Reimplemented from lldb_private::ObjectFile.
Definition at line 346 of file ObjectFileWasm.cpp.
References DecodeSections(), lldb_private::ModuleChild::GetModule(), lldb_private::SectionList::GetSectionAtIndex(), lldb_private::ObjectFile::GetSectionList(), lldb_private::SectionList::GetSize(), LLDB_INVALID_ADDRESS, lldb_private::ObjectFile::m_memory_addr, and lldb_private::Target::SetSectionLoadAddress().
|
static |
Definition at line 87 of file ObjectFileWasm.cpp.
References CreateInstance(), and lldb_private::PluginManager::UnregisterPlugin().
|
static |
LLVM RTTI support.
Definition at line 57 of file ObjectFileWasm.h.
|
private |
Definition at line 145 of file ObjectFileWasm.h.
Referenced by GetAddressByteSize(), GetArchitecture(), and GetByteOrder().
|
private |
Definition at line 144 of file ObjectFileWasm.h.
Referenced by CreateSections(), DecodeNextSection(), DumpSectionHeaders(), and GetExternalDebugInfoFileSpec().
|
private |
Definition at line 146 of file ObjectFileWasm.h.
Referenced by GetUUID().