LLVM 20.0.0git
|
This implements the Apple accelerator table format, a precursor of the DWARF 5 accelerator table format. More...
#include "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h"
Classes | |
class | Entry |
Apple-specific implementation of an Accelerator Entry. More... | |
struct | EntryWithName |
class | Iterator |
An iterator for all entries in the table. More... | |
class | SameNameIterator |
An iterator for Entries all having the same string as key. More... | |
Public Member Functions | |
AppleAcceleratorTable (const DWARFDataExtractor &AccelSection, DataExtractor StringSection) | |
Error | extract () override |
uint32_t | getNumBuckets () const |
uint32_t | getNumHashes () const |
uint32_t | getSizeHdr () const |
uint32_t | getHeaderDataLength () const |
uint32_t | getHashDataEntryLength () const |
Returns the size of one HashData entry. | |
ArrayRef< std::pair< HeaderData::AtomType, HeaderData::Form > > | getAtomsDesc () |
Return the Atom description, which can be used to interpret the raw values of the Accelerator Entries in this table. | |
bool | containsAtomType (HeaderData::AtomType AtomTy) const |
Returns true iff AtomTy is one of the atoms available in Entries of this table. | |
bool | validateForms () |
std::pair< uint64_t, dwarf::Tag > | readAtoms (uint64_t *HashDataOffset) |
Return information related to the DWARF DIE we're looking for when performing a lookup by name. | |
void | dump (raw_ostream &OS) const override |
iterator_range< SameNameIterator > | equal_range (StringRef Key) const |
Look up all entries in the accelerator table matching Key . | |
auto | entries () const |
Lookup all entries in the accelerator table. | |
Public Member Functions inherited from llvm::DWARFAcceleratorTable | |
DWARFAcceleratorTable (const DWARFDataExtractor &AccelSection, DataExtractor StringSection) | |
virtual | ~DWARFAcceleratorTable () |
virtual Error | extract ()=0 |
virtual void | dump (raw_ostream &OS) const =0 |
DWARFAcceleratorTable (const DWARFAcceleratorTable &)=delete | |
void | operator= (const DWARFAcceleratorTable &)=delete |
Additional Inherited Members | |
Protected Attributes inherited from llvm::DWARFAcceleratorTable | |
DWARFDataExtractor | AccelSection |
DataExtractor | StringSection |
This implements the Apple accelerator table format, a precursor of the DWARF 5 accelerator table format.
Definition at line 100 of file DWARFAcceleratorTable.h.
|
inline |
Definition at line 317 of file DWARFAcceleratorTable.h.
|
inline |
Returns true iff AtomTy
is one of the atoms available in Entries of this table.
Definition at line 336 of file DWARFAcceleratorTable.h.
References llvm::is_contained(), and llvm::make_first_range().
|
overridevirtual |
Implements llvm::DWARFAcceleratorTable.
Definition at line 213 of file DWARFAcceleratorTable.cpp.
References llvm::DWARFAcceleratorTable::AccelSection, for(), formatAtom(), llvm::formatv(), getHashDataEntryLength(), llvm::DataExtractor::getU32(), llvm::DataExtractor::isValidOffset(), llvm::Offset, OS, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::Twine::utohexstr().
Referenced by llvm::DWARFContext::dump().
|
inline |
Lookup all entries in the accelerator table.
Definition at line 357 of file DWARFAcceleratorTable.h.
References llvm::make_range().
iterator_range< AppleAcceleratorTable::SameNameIterator > AppleAcceleratorTable::equal_range | ( | StringRef | Key | ) | const |
Look up all entries in the accelerator table matching Key
.
Definition at line 350 of file DWARFAcceleratorTable.cpp.
References llvm::DWARFAcceleratorTable::AccelSection, llvm::djbHash(), getHashDataEntryLength(), llvm::make_range(), and llvm::DataExtractor::size().
|
overridevirtual |
Implements llvm::DWARFAcceleratorTable.
Definition at line 43 of file DWARFAcceleratorTable.cpp.
References llvm::DWARFAcceleratorTable::AccelSection, llvm::createStringError(), llvm::dwarf::DWARF32, llvm::dwarf::FormEncodingString(), llvm::dwarf::getFixedFormByteSize(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU32(), llvm::illegal_byte_sequence, llvm::DataExtractor::isValidOffset(), llvm::not_supported, llvm::Offset, offsetof, and llvm::Error::success().
ArrayRef< std::pair< AppleAcceleratorTable::HeaderData::AtomType, AppleAcceleratorTable::HeaderData::Form > > AppleAcceleratorTable::getAtomsDesc | ( | ) |
Return the Atom description, which can be used to interpret the raw values of the Accelerator Entries in this table.
Definition at line 103 of file DWARFAcceleratorTable.cpp.
Referenced by readAtoms(), and validateForms().
|
inline |
Returns the size of one HashData entry.
Definition at line 328 of file DWARFAcceleratorTable.h.
Referenced by dump(), equal_range(), and llvm::AppleAcceleratorTable::SameNameIterator::operator++().
uint32_t AppleAcceleratorTable::getHeaderDataLength | ( | ) | const |
Definition at line 97 of file DWARFAcceleratorTable.cpp.
uint32_t AppleAcceleratorTable::getNumBuckets | ( | ) | const |
Definition at line 92 of file DWARFAcceleratorTable.cpp.
uint32_t AppleAcceleratorTable::getNumHashes | ( | ) | const |
Definition at line 95 of file DWARFAcceleratorTable.cpp.
uint32_t AppleAcceleratorTable::getSizeHdr | ( | ) | const |
Definition at line 96 of file DWARFAcceleratorTable.cpp.
std::pair< uint64_t, dwarf::Tag > AppleAcceleratorTable::readAtoms | ( | uint64_t * | HashDataOffset | ) |
Return information related to the DWARF DIE we're looking for when performing a lookup by name.
HashDataOffset | an offset into the hash data table |
Definition at line 127 of file DWARFAcceleratorTable.cpp.
References llvm::DWARFAcceleratorTable::AccelSection, llvm::dwarf::DW_ATOM_die_offset, llvm::dwarf::DW_ATOM_die_tag, llvm::dwarf::DW_INVALID_OFFSET, llvm::DWARFFormValue::extractValue(), llvm::DWARFFormValue::getAsUnsignedConstant(), and getAtomsDesc().
bool AppleAcceleratorTable::validateForms | ( | ) |
Definition at line 107 of file DWARFAcceleratorTable.cpp.
References llvm::dwarf::DW_ATOM_die_offset, llvm::dwarf::DW_ATOM_die_tag, llvm::dwarf::DW_ATOM_type_flags, llvm::DWARFFormValue::FC_Constant, llvm::DWARFFormValue::FC_Flag, getAtomsDesc(), llvm::DWARFFormValue::getForm(), and llvm::DWARFFormValue::isFormClass().