9#ifndef LLDB_CORE_SECTION_H
10#define LLDB_CORE_SECTION_H
20#include "llvm/Support/JSON.h"
59 void Dump(llvm::raw_ostream &s,
unsigned indent,
Target *target,
60 bool show_header, uint32_t depth)
const;
68 size_t start_idx = 0)
const;
105 std::optional<lldb::SectionType>
type;
110class Section :
public std::enable_shared_from_this<Section>,
121 uint32_t target_byte_size = 1);
132 uint32_t target_byte_size = 1);
144 void Dump(llvm::raw_ostream &s,
unsigned indent,
Target *target,
145 uint32_t depth)
const;
147 void DumpName(llvm::raw_ostream &s)
const;
152 bool allow_section_end =
false)
const;
301bool fromJSON(
const llvm::json::Value &value,
305 llvm::json::Path path);
A section + offset based address class.
A uniqued constant string class.
A mix in class that contains a pointer back to the module that owns the object which inherits from it...
A plug-in interface definition class for object file parsers.
const_iterator begin() const
bool ContainsSection(lldb::user_id_t sect_id) const
const_iterator end() const
lldb::SectionSP FindSectionByName(ConstString section_dstr) const
collection::iterator iterator
size_t GetNumSections(uint32_t depth) const
lldb::SectionSP FindSectionByID(lldb::user_id_t sect_id) const
SectionList()=default
Create an empty list.
size_t Slide(lldb::addr_t slide_amount, bool slide_children)
lldb::SectionSP FindSectionContainingFileAddress(lldb::addr_t addr, uint32_t depth=UINT32_MAX) const
uint64_t GetDebugInfoSize() const
Get the debug information size from all sections that contain debug information.
bool DeleteSection(size_t idx)
std::vector< lldb::SectionSP > collection
size_t AddSection(const lldb::SectionSP §ion_sp)
bool ReplaceSection(lldb::user_id_t sect_id, const lldb::SectionSP §ion_sp, uint32_t depth=UINT32_MAX)
SectionList & operator=(const SectionList &rhs)
size_t FindSectionIndex(const Section *sect)
lldb::SectionSP FindSectionByType(lldb::SectionType sect_type, bool check_children, size_t start_idx=0) const
size_t AddUniqueSection(const lldb::SectionSP §ion_sp)
void Dump(llvm::raw_ostream &s, unsigned indent, Target *target, bool show_header, uint32_t depth) const
lldb::SectionSP GetSectionAtIndex(size_t idx) const
collection::const_iterator const_iterator
bool IsThreadSpecific() const
bool ContainsFileAddress(lldb::addr_t vm_addr) const
const SectionList & GetChildren() const
uint32_t GetTargetByteSize() const
lldb::addr_t GetOffset() const
const Section & operator=(const Section &)=delete
const ObjectFile * GetObjectFile() const
void SetPermissions(uint32_t permissions)
Set the permissions using bits OR'ed from lldb::Permissions.
ConstString GetName() const
void SetIsFake(bool fake)
void DumpName(llvm::raw_ostream &s) const
void SetByteSize(lldb::addr_t byte_size)
lldb::offset_t GetSectionData(void *dst, lldb::offset_t dst_len, lldb::offset_t offset=0)
Read the section data from the object file that the section resides in.
bool IsDescendant(const Section *section)
void SetFileOffset(lldb::offset_t file_offset)
void SetIsRelocated(bool b)
lldb::SectionSP GetParent() const
uint32_t GetPermissions() const
Get the permissions as OR'ed bits from lldb::Permissions.
bool SetFileAddress(lldb::addr_t file_addr)
lldb::offset_t GetFileOffset() const
lldb::SectionWP m_parent_wp
lldb::addr_t GetFileAddress() const
SectionList & GetChildren()
ObjectFile * GetObjectFile()
bool ContainsOnlyDebugInfo() const
Returns true if this section contains debug information.
void Dump(llvm::raw_ostream &s, unsigned indent, Target *target, uint32_t depth) const
void SetFileSize(lldb::offset_t file_size)
const char * GetTypeAsCString() const
lldb::SectionType GetType() const
lldb::addr_t GetLoadBaseAddress(Target *target) const
bool Slide(lldb::addr_t slide_amount, bool slide_children)
Section(const Section &)=delete
static int Compare(const Section &a, const Section &b)
bool ResolveContainedAddress(lldb::addr_t offset, Address &so_addr, bool allow_section_end=false) const
void SetLog2Align(uint32_t align)
lldb::offset_t m_file_offset
lldb::offset_t m_file_size
lldb::addr_t GetByteSize() const
void SetIsThreadSpecific(bool b)
void SetIsEncrypted(bool b)
uint32_t m_target_byte_size
lldb::offset_t GetFileSize() const
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Section > SectionSP
std::shared_ptr< lldb_private::Module > ModuleSP
std::weak_ptr< lldb_private::Section > SectionWP
bool fromJSON(const llvm::json::Value &value, lldb_private::JSONSection §ion, llvm::json::Path path)
std::optional< uint64_t > size
std::optional< lldb::SectionType > type
std::optional< uint64_t > address
A mix in class that contains a generic user ID.