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 481 of file Section.cpp.
References m_sections.
Referenced by AddUniqueSection(), SymbolVendorELF::CreateInstance(), SymbolVendorPECOFF::CreateInstance(), lldb_private::wasm::SymbolVendorWasm::CreateInstance(), ObjectFileCOFF::CreateSections(), ObjectFileELF::CreateSections(), ObjectFilePECOFF::CreateSections(), ObjectFilePlaceholder::CreateSections(), lldb_private::breakpad::ObjectFileBreakpad::CreateSections(), lldb_private::ObjectFileJSON::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 513 of file Section.cpp.
References AddSection(), FindSectionIndex(), and UINT32_MAX.
|
inline |
Definition at line 43 of file Section.h.
References m_sections.
|
inline |
|
inline |
Definition at line 91 of file Section.h.
References m_sections.
bool SectionList::ContainsSection | ( | lldb::user_id_t | sect_id | ) | const |
Definition at line 640 of file Section.cpp.
References FindSectionByID().
bool SectionList::DeleteSection | ( | size_t | idx | ) |
Definition at line 492 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 644 of file Section.cpp.
References lldb_private::Target::GetSectionLoadList(), lldb_private::SectionLoadList::IsEmpty(), and m_sections.
Referenced by lldb_private::ObjectFileJIT::Dump(), ObjectFileELF::Dump(), ObjectFileMachO::Dump(), ObjectFilePECOFF::Dump(), lldb_private::Section::Dump(), lldb_private::wasm::ObjectFileWasm::Dump(), and DumpModuleSections().
|
inline |
Definition at line 44 of file Section.h.
References m_sections.
|
inline |
Definition at line 42 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 580 of file Section.cpp.
References end(), and m_sections.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ContainsSection(), ConvertPDBLocationToDWARFExpression(), MachSymtabSectionInfo::GetSection(), lldb_private::npdb::MakeGlobalLocationExpression(), ObjectFileELF::ParseSymbols(), ObjectFileELF::ParseSymbolTable(), ObjectFileELF::ParseTrampolineSymbols(), and ObjectFileELF::RelocateDebugSections().
SectionSP SectionList::FindSectionByName | ( | ConstString | section_dstr | ) | const |
Definition at line 558 of file Section.cpp.
References end(), FindSectionByName(), lldb_private::Section::GetChildren(), lldb_private::Section::GetName(), and m_sections.
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), lldb_private::plugin::dwarf::SymbolFileDWARF::CalculateAbilities(), ObjectFileELF::CalculateStrata(), 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(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), 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 598 of file Section.cpp.
References m_sections.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::CalculateAbilities(), SymbolVendorELF::CreateInstance(), SymbolVendorPECOFF::CreateInstance(), lldb_private::wasm::SymbolVendorWasm::CreateInstance(), ObjectFileELF::CreateSections(), lldb_private::ForEachFormatterInModule(), lldb_private::CompactUnwindInfo::GetCompactUnwindInfoForFunction(), lldb_private::UnwindTable::Initialize(), LoadSection(), lldb_private::plugin::dwarf::SymbolFileDWARF::LoadSectionData(), lldb_private::SymbolFileCTF::ParseHeader(), and ObjectFileELF::ParseSymtab().
SectionSP SectionList::FindSectionContainingFileAddress | ( | lldb::addr_t | addr, |
uint32_t | depth = UINT32_MAX |
||
) | const |
Definition at line 617 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 500 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 675 of file Section.cpp.
References GetDebugInfoSize(), GetSize(), and m_sections.
Referenced by GetDebugInfoSize(), lldb_private::SymbolFileCommon::GetDebugInfoSize(), and lldb_private::plugin::dwarf::SymbolFileDWARFDwo::GetDebugInfoSize().
size_t SectionList::GetNumSections | ( | uint32_t | depth | ) | const |
Definition at line 539 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 550 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(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::breakpad::SymbolFileBreakpad::LineIterator::operator++(), ObjectFileCOFF::ParseSymtab(), JITLoaderGDB::ReadJITDescriptorImpl(), lldb_private::Section::ResolveContainedAddress(), elf::ELFSymbol::sectionIndexToCString(), lldb_private::ObjectFileJIT::SetLoadAddress(), ObjectFileELF::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 75 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(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), JITLoaderGDB::ReadJITDescriptorImpl(), lldb_private::Section::ResolveContainedAddress(), lldb_private::ObjectFileJIT::SetLoadAddress(), ObjectFileELF::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 475 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 521 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 665 of file Section.cpp.
References end(), and m_sections.
Referenced by ObjectFileMachO::ProcessSegmentCommand(), and lldb_private::Section::Slide().
|
protected |
Definition at line 100 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().