|
LLDB mainline
|
#include <ObjectContainerClangOffloadBundle.h>
Classes | |
| struct | Entry |
Public Member Functions | |
| ObjectContainerClangOffloadBundle (const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t file_offset, lldb::offset_t length) | |
| ~ObjectContainerClangOffloadBundle () override | |
| bool | ParseHeader () override |
| Attempts to parse the object header. | |
| size_t | GetNumArchitectures () const override |
| Get the number of architectures in this object file. | |
| bool | GetArchitectureAtIndex (uint32_t idx, lldb_private::ArchSpec &arch) const override |
| Gets the architecture given an index. | |
| lldb::ObjectFileSP | GetObjectFile (const lldb_private::FileSpec *file) override |
| Selects an architecture in an object file. | |
| llvm::StringRef | GetPluginName () override |
| Public Member Functions inherited from lldb_private::ObjectContainer | |
| ObjectContainer (const lldb::ModuleSP &module_sp, const FileSpec *file, 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. | |
| ~ObjectContainer () override=default | |
| Destructor. | |
| virtual lldb::addr_t | GetOffset () const |
| Returns the offset into a file at which this object resides. | |
| virtual lldb::addr_t | GetByteSize () const |
| virtual size_t | GetNumObjects () const |
| Get the number of objects within this object file (archives). | |
| Public Member Functions inherited from lldb_private::PluginInterface | |
| PluginInterface ()=default | |
| virtual | ~PluginInterface ()=default |
| 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. | |
Static Public Member Functions | |
| static void | Initialize () |
| static void | Terminate () |
| static llvm::StringRef | GetPluginNameStatic () |
| static llvm::StringRef | GetPluginDescriptionStatic () |
| static lldb_private::ObjectContainer * | CreateInstance (const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t file_offset, lldb::offset_t length) |
| static lldb_private::ModuleSpecList | GetModuleSpecifications (const lldb_private::FileSpec &file, lldb::DataExtractorSP &extractor_sp, lldb::offset_t file_offset, lldb::offset_t file_size) |
| static bool | MagicBytesMatch (const lldb_private::DataExtractor &data) |
| Static Public Member Functions inherited from lldb_private::ObjectContainer | |
| static lldb::ObjectContainerSP | FindPlugin (const lldb::ModuleSP &module_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, lldb::WritableDataBufferSP file_data_sp) |
Static Protected Member Functions | |
| static bool | FindBundleEntries (const lldb_private::FileSpec &file, std::vector< Entry > &entries) |
Protected Attributes | |
| std::vector< Entry > | m_entries |
| Protected Attributes inherited from lldb_private::ObjectContainer | |
| FileSpec | m_file |
| The file that represents this container objects (which can be different from the module's file). | |
| lldb::addr_t | m_offset |
| The offset in bytes into the file, or the address in memory. | |
| lldb::addr_t | m_length |
| The size in bytes if known (can be zero). | |
| lldb::DataExtractorSP | m_extractor_sp |
| The data for this object file so things can be parsed lazily. | |
| Protected Attributes inherited from lldb_private::ModuleChild | |
| lldb::ModuleWP | m_module_wp |
| The Module that owns the object that inherits from this class. | |
Definition at line 18 of file ObjectContainerClangOffloadBundle.h.
| ObjectContainerClangOffloadBundle::ObjectContainerClangOffloadBundle | ( | const lldb::ModuleSP & | module_sp, |
| lldb::DataBufferSP & | data_sp, | ||
| lldb::offset_t | data_offset, | ||
| const lldb_private::FileSpec * | file, | ||
| lldb::offset_t | file_offset, | ||
| lldb::offset_t | length ) |
Definition at line 41 of file ObjectContainerClangOffloadBundle.cpp.
References lldb_private::ObjectContainer::ObjectContainer().
Referenced by Initialize().
|
overridedefault |
|
static |
Definition at line 170 of file ObjectContainerClangOffloadBundle.cpp.
References MagicBytesMatch(), lldb_private::ObjectContainer::ObjectContainer(), and lldb_private::DataExtractor::SetData().
Referenced by Initialize(), and Terminate().
|
staticprotected |
Definition at line 77 of file ObjectContainerClangOffloadBundle.cpp.
References ObjectContainerClangOffloadBundle::Entry::arch, ObjectContainerClangOffloadBundle::Entry::extractor_sp, lldb_private::FileSystem::GetModificationTime(), lldb_private::FileSpec::GetPath(), lldb_private::FileSystem::Instance(), lldb_private::ArchSpec::IsValid(), ObjectContainerClangOffloadBundle::Entry::offset, ParseArchFromBundleEntryID(), and ObjectContainerClangOffloadBundle::Entry::size.
Referenced by GetModuleSpecifications(), and ParseHeader().
|
overridevirtual |
Gets the architecture given an index.
Copies the architecture specification for index idx.
| [in] | idx | The architecture index to extract. |
| [out] | arch | A architecture object that will be filled in if idx is a architecture valid index. |
Reimplemented from lldb_private::ObjectContainer.
Definition at line 201 of file ObjectContainerClangOffloadBundle.cpp.
References m_entries.
|
static |
Definition at line 210 of file ObjectContainerClangOffloadBundle.cpp.
References lldb_private::ModuleSpecList::Append(), FindBundleEntries(), lldb_private::ModuleSpec::GetArchitecture(), MagicBytesMatch(), lldb_private::ModuleSpec::SetObjectOffset(), and lldb_private::ModuleSpec::SetObjectSize().
Referenced by Initialize().
|
overridevirtual |
Get the number of architectures in this object file.
The default implementation returns 1 as for object files that contain a single architecture. ObjectContainer instances that contain more than one architecture should override this function and return an appropriate value.
Reimplemented from lldb_private::ObjectContainer.
Definition at line 197 of file ObjectContainerClangOffloadBundle.cpp.
References m_entries.
|
overridevirtual |
Selects an architecture in an object file.
Object files that contain a single architecture should verify that the specified arch matches the architecture in the object file and return true or false accordingly.
Object files that contain more than one architecture should attempt to select that architecture, and if successful, clear out any previous state from any previously selected architecture and prepare to return information for the new architecture.
Implements lldb_private::ObjectContainer.
Definition at line 235 of file ObjectContainerClangOffloadBundle.cpp.
References lldb_private::ObjectFile::FindPlugin(), lldb_private::Target::GetDefaultArchitecture(), lldb_private::ModuleChild::GetModule(), lldb_private::ArchSpec::IsCompatibleMatch(), lldb_private::ArchSpec::IsExactMatch(), lldb_private::ArchSpec::IsValid(), LLDB_ARCH_DEFAULT, m_entries, and lldb_private::ArchSpec::SetTriple().
|
inlinestatic |
Definition at line 36 of file ObjectContainerClangOffloadBundle.h.
Referenced by Initialize().
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 61 of file ObjectContainerClangOffloadBundle.h.
References GetPluginNameStatic().
|
inlinestatic |
Definition at line 32 of file ObjectContainerClangOffloadBundle.h.
Referenced by GetPluginName(), and Initialize().
|
static |
Definition at line 31 of file ObjectContainerClangOffloadBundle.cpp.
References CreateInstance(), GetModuleSpecifications(), GetPluginDescriptionStatic(), GetPluginNameStatic(), Initialize(), ObjectContainerClangOffloadBundle(), and lldb_private::PluginManager::RegisterPlugin().
Referenced by Initialize().
|
static |
Definition at line 51 of file ObjectContainerClangOffloadBundle.cpp.
References lldb_private::DataExtractor::GetByteSize(), and lldb_private::DataExtractor::GetDataStart().
Referenced by CreateInstance(), and GetModuleSpecifications().
|
overridevirtual |
Attempts to parse the object header.
This function is used as a test to see if a given plug-in instance can parse the header data already contained in ObjectContainer::m_extractor_sp. If an object file parser does not recognize that magic bytes in a header, false should be returned and the next plug-in can attempt to parse an object file.
Implements lldb_private::ObjectContainer.
Definition at line 190 of file ObjectContainerClangOffloadBundle.cpp.
References FindBundleEntries(), m_entries, and lldb_private::ObjectContainer::m_file.
|
static |
Definition at line 37 of file ObjectContainerClangOffloadBundle.cpp.
References CreateInstance(), and lldb_private::PluginManager::UnregisterPlugin().
|
protected |
Definition at line 70 of file ObjectContainerClangOffloadBundle.h.
Referenced by GetArchitectureAtIndex(), GetNumArchitectures(), GetObjectFile(), and ParseHeader().