LLDB mainline
|
#include <Section.h>
Public Types | |
typedef std::vector< lldb::SectionSP > | collection |
typedef collection::iterator | iterator |
typedef collection::const_iterator | const_iterator |
Public Member Functions | |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | begin () |
const_iterator | end () |
SectionList ()=default | |
Create an empty list. | |
SectionList & | operator= (const SectionList &rhs) |
size_t | AddSection (const lldb::SectionSP §ion_sp) |
size_t | AddUniqueSection (const lldb::SectionSP §ion_sp) |
size_t | FindSectionIndex (const Section *sect) |
bool | ContainsSection (lldb::user_id_t sect_id) const |
void | Dump (llvm::raw_ostream &s, unsigned indent, Target *target, bool show_header, uint32_t depth) const |
lldb::SectionSP | FindSectionByName (ConstString section_dstr) const |
lldb::SectionSP | FindSectionByID (lldb::user_id_t sect_id) const |
lldb::SectionSP | FindSectionByType (lldb::SectionType sect_type, bool check_children, size_t start_idx=0) const |
lldb::SectionSP | FindSectionContainingFileAddress (lldb::addr_t addr, uint32_t depth=UINT32_MAX) const |
size_t | GetSize () const |
size_t | GetNumSections (uint32_t depth) const |
bool | ReplaceSection (lldb::user_id_t sect_id, const lldb::SectionSP §ion_sp, uint32_t depth=UINT32_MAX) |
bool | DeleteSection (size_t idx) |
lldb::SectionSP | GetSectionAtIndex (size_t idx) const |
size_t | Slide (lldb::addr_t slide_amount, bool slide_children) |
void | Clear () |
uint64_t | GetDebugInfoSize () const |
Get the debug information size from all sections that contain debug information. | |
Protected Attributes | |
collection | m_sections |
typedef std::vector<lldb::SectionSP> lldb_private::SectionList::collection |
typedef collection::const_iterator lldb_private::SectionList::const_iterator |
typedef collection::iterator lldb_private::SectionList::iterator |
|
default |
Create an empty list.
size_t SectionList::AddSection | ( | const lldb::SectionSP & | section_sp | ) |
Definition at line 469 of file Section.cpp.
References m_sections.
Referenced by AddUniqueSection(), SymbolVendorELF::CreateInstance(), SymbolVendorPECOFF::CreateInstance(), lldb_private::wasm::SymbolVendorWasm::CreateInstance(), ObjectFileELF::CreateSections(), ObjectFilePECOFF::CreateSections(), ObjectFilePlaceholder::CreateSections(), lldb_private::breakpad::ObjectFileBreakpad::CreateSections(), lldb_private::wasm::ObjectFileWasm::CreateSections(), lldb_private::IRExecutionUnit::PopulateSectionList(), and ObjectFileMachO::ProcessSegmentCommand().
size_t SectionList::AddUniqueSection | ( | const lldb::SectionSP & | section_sp | ) |
Definition at line 501 of file Section.cpp.
References AddSection(), FindSectionIndex(), and UINT32_MAX.
|
inline |
Definition at line 42 of file Section.h.
References m_sections.
|
inline |
|
inline |
Definition at line 90 of file Section.h.
References m_sections.
bool SectionList::ContainsSection | ( | lldb::user_id_t | sect_id | ) | const |
Definition at line 628 of file Section.cpp.
References FindSectionByID().
bool SectionList::DeleteSection | ( | size_t | idx | ) |
Definition at line 480 of file Section.cpp.
References m_sections.
Referenced by lldb_private::Module::SetSymbolFileFileSpec().
void SectionList::Dump | ( | llvm::raw_ostream & | s, |
unsigned | indent, | ||
Target * | target, | ||
bool | show_header, | ||
uint32_t | depth | ||
) | const |
Definition at line 632 of file Section.cpp.
References lldb_private::Target::GetSectionLoadList(), lldb_private::SectionLoadList::IsEmpty(), and m_sections.
Referenced by ObjectFileELF::Dump(), ObjectFileJIT::Dump(), ObjectFileMachO::Dump(), ObjectFilePECOFF::Dump(), lldb_private::Section::Dump(), lldb_private::wasm::ObjectFileWasm::Dump(), and DumpModuleSections().
|
inline |
Definition at line 43 of file Section.h.
References m_sections.
|
inline |
Definition at line 41 of file Section.h.
References m_sections.
Referenced by FindSectionByID(), FindSectionByName(), FindSectionContainingFileAddress(), FindSectionIndex(), GetNumSections(), ReplaceSection(), and Slide().
SectionSP SectionList::FindSectionByID | ( | lldb::user_id_t | sect_id | ) | const |
Definition at line 568 of file Section.cpp.
References end(), and m_sections.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ContainsSection(), ConvertPDBLocationToDWARFExpression(), MachSymtabSectionInfo::GetSection(), ObjectFileELF::ParseDependentModules(), ObjectFileELF::ParseSymbols(), ObjectFileELF::ParseSymbolTable(), ObjectFileELF::ParseTrampolineSymbols(), and ObjectFileELF::RelocateDebugSections().
SectionSP SectionList::FindSectionByName | ( | ConstString | section_dstr | ) | const |
Definition at line 546 of file Section.cpp.
References end(), FindSectionByName(), lldb_private::Section::GetChildren(), lldb_private::Section::GetName(), and m_sections.
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), SymbolFileDWARF::CalculateAbilities(), ObjectFileMachO::CalculateStrata(), CommandObjectTargetModulesLoad::DoExecute(), lldb_private::PlatformDarwin::ExtractCrashInfoAnnotations(), lldb::SBModule::FindSection(), FindSectionByName(), ObjectFileMachO::GetBaseAddress(), ObjectFileMachO::GetEntryPointAddress(), ObjectFileELF::GetGnuDebugDataObjectFile(), ObjectFileMachO::GetMachHeaderSection(), lldb_private::AppleObjCRuntime::GetObjCVersion(), lldb_private::AppleObjCRuntimeV2::GetSharedCacheReadOnlyAddress(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), ObjectFileELF::ParseSymbols(), ObjectFileMachO::ParseSymtab(), ObjectFileMachO::ProcessSegmentCommand(), lldb_private::DynamicLoaderDarwin::UnloadModuleSections(), and lldb_private::DynamicLoaderDarwin::UpdateImageLoadAddress().
SectionSP SectionList::FindSectionByType | ( | lldb::SectionType | sect_type, |
bool | check_children, | ||
size_t | start_idx = 0 |
||
) | const |
Definition at line 586 of file Section.cpp.
References m_sections.
Referenced by SymbolFileDWARF::CalculateAbilities(), SymbolVendorELF::CreateInstance(), SymbolVendorPECOFF::CreateInstance(), lldb_private::wasm::SymbolVendorWasm::CreateInstance(), ObjectFileELF::CreateSections(), lldb_private::CompactUnwindInfo::GetCompactUnwindInfoForFunction(), ObjectFileELF::GetImageInfoAddress(), lldb_private::UnwindTable::Initialize(), LoadSection(), SymbolFileDWARF::LoadSectionData(), ObjectFileELF::ParseDependentModules(), ObjectFileELF::ParseDynamicSymbols(), and ObjectFileELF::ParseSymtab().
SectionSP SectionList::FindSectionContainingFileAddress | ( | lldb::addr_t | addr, |
uint32_t | depth = UINT32_MAX |
||
) | const |
Definition at line 605 of file Section.cpp.
References lldb_private::Section::ContainsFileAddress(), end(), FindSectionContainingFileAddress(), lldb_private::Section::GetChildren(), lldb_private::Section::IsFake(), and m_sections.
Referenced by lldb_private::breakpad::SymbolFileBreakpad::AddSymbols(), FindSectionContainingFileAddress(), lldb_private::Symbol::FromJSON(), lldb_private::breakpad::SymbolFileBreakpad::GetOrCreateFunction(), MachSymtabSectionInfo::GetSection(), ObjectFileELF::ParseSymtab(), ObjectFileELF::ParseUnwindSymbols(), and lldb_private::Address::ResolveAddressUsingFileSections().
size_t SectionList::FindSectionIndex | ( | const Section * | sect | ) |
Definition at line 488 of file Section.cpp.
References begin(), end(), m_sections, and UINT32_MAX.
Referenced by AddUniqueSection().
uint64_t SectionList::GetDebugInfoSize | ( | ) | const |
Get the debug information size from all sections that contain debug information.
Symbol tables are not considered part of the debug information for this call, just known sections that contain debug information.
Definition at line 665 of file Section.cpp.
References GetDebugInfoSize(), GetSize(), and m_sections.
Referenced by GetDebugInfoSize(), and lldb_private::SymbolFileCommon::GetDebugInfoSize().
size_t SectionList::GetNumSections | ( | uint32_t | depth | ) | const |
Definition at line 527 of file Section.cpp.
References end(), and m_sections.
Referenced by AddSectionsToRangeMap(), ProcessMachCore::CreateMemoryRegions(), lldb_private::ObjectFile::GetLoadableData(), MachSymtabSectionInfo::MachSymtabSectionInfo(), lldb_private::breakpad::SymbolFileBreakpad::LineIterator::operator++(), lldb_private::Module::SetSymbolFileFileSpec(), and lldb_private::Target::UnloadModuleSections().
SectionSP SectionList::GetSectionAtIndex | ( | size_t | idx | ) | const |
Definition at line 538 of file Section.cpp.
References m_sections.
Referenced by AddSectionsToRangeMap(), lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), lldb::SBTarget::ClearModuleLoadAddress(), CreateAllImageInfosPayload(), ProcessMachCore::CreateMemoryRegions(), lldb_private::ObjectFile::GetLoadableData(), ObjectFileMachO::GetMachHeaderSection(), MachSymtabSectionInfo::GetSection(), lldb::SBModule::GetSectionAtIndex(), lldb_private::Module::IsLoadedInTarget(), lldb_private::breakpad::SymbolFileBreakpad::LineIterator::LineIterator(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::breakpad::SymbolFileBreakpad::LineIterator::operator++(), JITLoaderGDB::ReadJITDescriptorImpl(), lldb_private::Section::ResolveContainedAddress(), elf::ELFSymbol::sectionIndexToCString(), ObjectFileELF::SetLoadAddress(), ObjectFileJIT::SetLoadAddress(), ObjectFileMachO::SetLoadAddress(), ObjectFilePECOFF::SetLoadAddress(), lldb_private::wasm::ObjectFileWasm::SetLoadAddress(), lldb_private::Module::SetSymbolFileFileSpec(), lldb_private::Target::UnloadModuleSections(), DynamicLoaderHexagonDYLD::UnloadSections(), lldb_private::DynamicLoader::UnloadSectionsCommon(), DynamicLoaderHexagonDYLD::UpdateLoadedSections(), and updateSectionLoadAddress().
|
inline |
Definition at line 74 of file Section.h.
References m_sections.
Referenced by lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), lldb::SBTarget::ClearModuleLoadAddress(), CreateAllImageInfosPayload(), GetDebugInfoSize(), ObjectFileMachO::GetMachHeaderSection(), lldb::SBModule::GetNumSections(), lldb_private::Module::IsLoadedInTarget(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), JITLoaderGDB::ReadJITDescriptorImpl(), lldb_private::Section::ResolveContainedAddress(), ObjectFileELF::SetLoadAddress(), ObjectFileJIT::SetLoadAddress(), ObjectFileMachO::SetLoadAddress(), ObjectFilePECOFF::SetLoadAddress(), lldb_private::wasm::ObjectFileWasm::SetLoadAddress(), DynamicLoaderHexagonDYLD::UnloadSections(), lldb_private::DynamicLoader::UnloadSectionsCommon(), DynamicLoaderHexagonDYLD::UpdateLoadedSections(), and updateSectionLoadAddress().
SectionList & SectionList::operator= | ( | const SectionList & | rhs | ) |
Definition at line 463 of file Section.cpp.
References m_sections.
bool SectionList::ReplaceSection | ( | lldb::user_id_t | sect_id, |
const lldb::SectionSP & | section_sp, | ||
uint32_t | depth = UINT32_MAX |
||
) |
Definition at line 509 of file Section.cpp.
References end(), m_sections, and ReplaceSection().
Referenced by SymbolVendorELF::CreateInstance(), SymbolVendorPECOFF::CreateInstance(), lldb_private::wasm::SymbolVendorWasm::CreateInstance(), ObjectFileELF::CreateSections(), and ReplaceSection().
size_t SectionList::Slide | ( | lldb::addr_t | slide_amount, |
bool | slide_children | ||
) |
Definition at line 655 of file Section.cpp.
References end(), and m_sections.
Referenced by ObjectFileMachO::ProcessSegmentCommand(), and lldb_private::Section::Slide().
|
protected |
Definition at line 99 of file Section.h.
Referenced by AddSection(), begin(), Clear(), DeleteSection(), Dump(), end(), FindSectionByID(), FindSectionByName(), FindSectionByType(), FindSectionContainingFileAddress(), FindSectionIndex(), GetDebugInfoSize(), GetNumSections(), GetSectionAtIndex(), GetSize(), operator=(), ReplaceSection(), and Slide().