LLDB mainline
ObjectContainerBigArchive.cpp
Go to the documentation of this file.
1//===-- ObjectContainerBigArchive.cpp -------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "lldb/Core/Module.h"
14
15using namespace lldb;
16using namespace lldb_private;
17
19
21 const llvm::sys::TimePoint<> &time,
22 lldb::offset_t file_offset,
23 lldb::DataExtractorSP extractor_sp)
24 : m_arch(arch), m_modification_time(time), m_file_offset(file_offset),
25 m_objects(), m_extractor_sp(extractor_sp) {}
26
28
34
38
40 const lldb::ModuleSP &module_sp, DataBufferSP &data_sp,
41 lldb::offset_t data_offset, const FileSpec *file,
42 lldb::offset_t file_offset, lldb::offset_t length) {
43 return nullptr;
44}
45
47 const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp,
48 lldb::offset_t data_offset, lldb::offset_t file_offset,
50 return 0;
51}
52
54 const lldb::ModuleSP &module_sp, DataBufferSP &data_sp,
55 lldb::offset_t data_offset, const lldb_private::FileSpec *file,
56 lldb::offset_t file_offset, lldb::offset_t size)
57 : ObjectContainer(module_sp, file, file_offset, size, data_sp, data_offset),
58 m_archive_sp() {}
59
63
65
67
#define LLDB_PLUGIN_DEFINE(PluginName)
std::vector< Object > m_objects
The data extractor for this object container so we don't lose data if the .a files gets modified.
Archive(const lldb_private::ArchSpec &arch, const llvm::sys::TimePoint<> &mod_time, lldb::offset_t file_offset, lldb::DataExtractorSP extractor_sp)
static llvm::StringRef GetPluginNameStatic()
void SetArchive(Archive::shared_ptr &archive_sp)
~ObjectContainerBigArchive() override
lldb::ObjectFileSP GetObjectFile(const lldb_private::FileSpec *file) override
Selects an architecture in an object file.
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 offset, lldb::offset_t length)
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 length, lldb_private::ModuleSpecList &specs)
ObjectContainerBigArchive(const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t offset, lldb::offset_t length)
bool ParseHeader() override
Attempts to parse the object header.
An architecture specification class.
Definition ArchSpec.h:31
A file utility class.
Definition FileSpec.h:57
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.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
A class that represents a running process on the host machine.
uint64_t offset_t
Definition lldb-types.h:85
std::shared_ptr< lldb_private::ObjectFile > ObjectFileSP
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::DataExtractor > DataExtractorSP
std::shared_ptr< lldb_private::Module > ModuleSP