#include "lldb/Core/Section.h"
#include "lldb/Core/Address.h"
#include "lldb/Core/Module.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/VMRange.h"
#include <cinttypes>
#include <limits>
#include <utility>
namespace lldb_private {
class DataExtractor;
}
usingnamespacelldb;
usingnamespacelldb_private;
const char *Section::GetTypeAsCString() const { … }
Section::Section(const ModuleSP &module_sp, ObjectFile *obj_file,
user_id_t sect_id, ConstString name,
SectionType sect_type, addr_t file_addr, addr_t byte_size,
lldb::offset_t file_offset, lldb::offset_t file_size,
uint32_t log2align, uint32_t flags,
uint32_t target_byte_size )
: … { … }
Section::Section(const lldb::SectionSP &parent_section_sp,
const ModuleSP &module_sp, ObjectFile *obj_file,
user_id_t sect_id, ConstString name,
SectionType sect_type, addr_t file_addr, addr_t byte_size,
lldb::offset_t file_offset, lldb::offset_t file_size,
uint32_t log2align, uint32_t flags,
uint32_t target_byte_size )
: … { … }
Section::~Section() = default;
addr_t Section::GetFileAddress() const { … }
bool Section::SetFileAddress(lldb::addr_t file_addr) { … }
lldb::addr_t Section::GetOffset() const { … }
addr_t Section::GetLoadBaseAddress(Target *target) const { … }
bool Section::ResolveContainedAddress(addr_t offset, Address &so_addr,
bool allow_section_end) const { … }
bool Section::ContainsFileAddress(addr_t vm_addr) const { … }
void Section::Dump(llvm::raw_ostream &s, unsigned indent, Target *target,
uint32_t depth) const { … }
void Section::DumpName(llvm::raw_ostream &s) const { … }
bool Section::IsDescendant(const Section *section) { … }
bool Section::Slide(addr_t slide_amount, bool slide_children) { … }
uint32_t Section::GetPermissions() const { … }
void Section::SetPermissions(uint32_t permissions) { … }
lldb::offset_t Section::GetSectionData(void *dst, lldb::offset_t dst_len,
lldb::offset_t offset) { … }
lldb::offset_t Section::GetSectionData(DataExtractor §ion_data) { … }
bool Section::ContainsOnlyDebugInfo() const { … }
#pragma mark SectionList
SectionList &SectionList::operator=(const SectionList &rhs) { … }
size_t SectionList::AddSection(const lldb::SectionSP §ion_sp) { … }
bool SectionList::DeleteSection(size_t idx) { … }
size_t SectionList::FindSectionIndex(const Section *sect) { … }
size_t SectionList::AddUniqueSection(const lldb::SectionSP §_sp) { … }
bool SectionList::ReplaceSection(user_id_t sect_id,
const lldb::SectionSP §_sp,
uint32_t depth) { … }
size_t SectionList::GetNumSections(uint32_t depth) const { … }
SectionSP SectionList::GetSectionAtIndex(size_t idx) const { … }
SectionSP
SectionList::FindSectionByName(ConstString section_dstr) const { … }
SectionSP SectionList::FindSectionByID(user_id_t sect_id) const { … }
SectionSP SectionList::FindSectionByType(SectionType sect_type,
bool check_children,
size_t start_idx) const { … }
SectionSP SectionList::FindSectionContainingFileAddress(addr_t vm_addr,
uint32_t depth) const { … }
bool SectionList::ContainsSection(user_id_t sect_id) const { … }
void SectionList::Dump(llvm::raw_ostream &s, unsigned indent, Target *target,
bool show_header, uint32_t depth) const { … }
size_t SectionList::Slide(addr_t slide_amount, bool slide_children) { … }
uint64_t SectionList::GetDebugInfoSize() const { … }
namespace llvm {
namespace json {
bool fromJSON(const llvm::json::Value &value,
lldb_private::JSONSection §ion, llvm::json::Path path) { … }
bool fromJSON(const llvm::json::Value &value, lldb::SectionType &type,
llvm::json::Path path) { … }
}
}