Go to the documentation of this file.
9 #ifndef LLDB_SOURCE_PLUGINS_OBJECTFILE_WASM_OBJECTFILEWASM_H
10 #define LLDB_SOURCE_PLUGINS_OBJECTFILE_WASM_OBJECTFILEWASM_H
29 return "WebAssembly object file reader.";
33 CreateInstance(
const lldb::ModuleSP &module_sp, lldb::DataBufferSP data_sp,
38 lldb::WritableDataBufferSP data_sp,
39 const lldb::ProcessSP &process_sp,
43 lldb::DataBufferSP &data_sp,
57 bool isA(
const void *ClassID)
const override {
100 bool value_is_offset)
override;
114 ObjectFileWasm(
const lldb::ModuleSP &module_sp, lldb::DataBufferSP data_sp,
118 lldb::WritableDataBufferSP header_data_sp,
119 const lldb::ProcessSP &process_sp,
lldb::addr_t header_addr);
150 #endif // LLDB_SOURCE_PLUGINS_OBJECTFILE_WASM_OBJECTFILEWASM_H
virtual bool isA(const void *ClassID) const
bool DecodeNextSection(lldb::offset_t *offset_ptr)
Wasm section decoding routines.
lldb::ByteOrder GetByteOrder() const
Returns the byte order for the architecture specification.
const lldb::addr_t m_memory_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)
Strata CalculateStrata() override
The object file should be able to calculate the strata of the object file.
UUID GetUUID() override
Gets the UUID for this object file.
AddressClass GetAddressClass(lldb::addr_t file_addr) override
Get the address type given a file address in an object file.
static char ID
LLVM RTTI support.
lldb_private::Address GetBaseAddress() override
Returns base address of this object file.
ArchSpec GetArchitecture() override
Get the ArchSpec for this object file.
static const char * GetPluginDescriptionStatic()
Generic Wasm object file reader.
bool IsStripped() override
Detect if this object file has been stripped of local symbols.
uint32_t GetDependentModules(FileSpecList &files) override
Extract the dependent modules from an object file.
DataExtractor ReadImageData(lldb::offset_t offset, uint32_t size)
Read a range of bytes from the Wasm module.
uint32_t GetAddressByteSize() const override
Gets the address size in bytes for the current object file.
Type CalculateType() override
The object file should be able to calculate its type by looking at its file header and possibly the s...
static bool classof(const ObjectFile *obj)
@ eTypeSharedLibrary
A shared library that can be used during execution.
struct lldb_private::wasm::ObjectFileWasm::section_info section_info_t
bool ParseHeader() override
ObjectFile Protocol.
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
bool IsExecutable() const override
Tells whether this object file is capable of being the main executable for a process.
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)
llvm::StringRef GetPluginName() override
PluginInterface protocol.
std::vector< section_info_t > m_sect_infos
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 im...
static llvm::StringRef GetPluginNameStatic()
void Dump(Stream *s) override
Dump a description of this object to a Stream.
void DumpSectionHeader(llvm::raw_ostream &ostream, const section_info_t &sh)
Wasm section header dump routines.
static ObjectFile * CreateMemoryInstance(const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr)
void DumpSectionHeaders(llvm::raw_ostream &ostream)
A class that represents a running process on the host machine.
void ParseSymtab(lldb_private::Symtab &symtab) override
Parse the symbol table into the provides symbol table object.
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)
bool isA(const void *ClassID) const override
void CreateSections(SectionList &unified_section_list) override
llvm::Optional< FileSpec > GetExternalDebugInfoFileSpec()
A Wasm module that has external DWARF debug information should contain a custom section named "extern...
lldb::ByteOrder GetByteOrder() const override
Gets whether endian swapping should occur when extracting data from this object file.
ByteOrder
Byte ordering definitions.