9#ifndef LLDB_SOURCE_PLUGINS_OBJECTFILE_JSON_OBJECTFILEJSON_H
10#define LLDB_SOURCE_PLUGINS_OBJECTFILE_JSON_OBJECTFILEJSON_H
14#include "llvm/Support/JSON.h"
26 return "JSON object file reader.";
50 bool isA(
const void *ClassID)
const override {
95 std::optional<ObjectFile::Type>
type;
114 UUID uuid,
Type type, std::vector<JSONSymbol> symbols,
115 std::vector<JSONSection> sections);
119 llvm::json::Path path);
122 llvm::json::Path path);
An architecture specification class.
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
lldb::ByteOrder GetByteOrder() const
Returns the byte order for the architecture specification.
uint32_t GetDependentModules(FileSpecList &files) override
Extract the dependent modules from an object file.
std::vector< JSONSection > m_sections
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)
lldb::ByteOrder GetByteOrder() const override
Gets whether endian swapping should occur when extracting data from this object file.
llvm::StringRef GetPluginName() override
ArchSpec GetArchitecture() override
Get the ArchSpec for this object file.
uint32_t GetAddressByteSize() const override
Gets the address size in bytes for the current object file.
void Dump(Stream *s) override
Dump a description of this object to a Stream.
void ParseSymtab(lldb_private::Symtab &symtab) override
Parse the symbol table into the provides symbol table object.
static bool MagicBytesMatch(lldb::DataBufferSP data_sp, lldb::addr_t offset, lldb::addr_t length)
UUID GetUUID() override
Gets the UUID for this object file.
static const char * GetPluginDescriptionStatic()
bool IsStripped() override
Detect if this object file has been stripped of local symbols.
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)
std::optional< uint64_t > m_size
Strata CalculateStrata() override
The object file should be able to calculate the strata of the object file.
void CreateSections(SectionList &unified_section_list) override
static bool classof(const ObjectFile *obj)
bool isA(const void *ClassID) const override
bool ParseHeader() override
Attempts to parse the object header.
static ObjectFile * CreateMemoryInstance(const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr)
std::vector< JSONSymbol > m_symbols
bool IsExecutable() const override
Tells whether this object file is capable of being the main executable for a process.
Type CalculateType() override
The object file should be able to calculate its type by looking at its file header and possibly the s...
static llvm::StringRef GetPluginNameStatic()
AddressClass GetAddressClass(lldb::addr_t file_addr) override
Get the address type given a file address in an object file.
A plug-in interface definition class for object file parsers.
virtual bool isA(const void *ClassID) const
A stream class that can stream formatted output to a file.
A class that represents a running process on the host machine.
bool fromJSON(const llvm::json::Value &value, TraceSupportedResponse &info, llvm::json::Path path)
std::shared_ptr< lldb_private::Process > ProcessSP
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
std::shared_ptr< lldb_private::Module > ModuleSP
std::vector< JSONSymbol > symbols
std::vector< JSONSection > sections