LLVM
8.0.1
|
#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
Public Types | |
enum | FormClass { FC_Unknown, FC_Address, FC_Block, FC_Constant, FC_String, FC_Flag, FC_Reference, FC_Indirect, FC_SectionOffset, FC_Exprloc } |
Static Public Member Functions | |
static void | dumpAddressSection (const DWARFObject &Obj, raw_ostream &OS, DIDumpOptions DumpOpts, uint64_t SectionIndex) |
static bool | skipValue (dwarf::Form Form, DataExtractor DebugInfoData, uint32_t *OffsetPtr, const dwarf::FormParams FormParams) |
Skip a form's value in DebugInfoData at the offset specified by OffsetPtr . More... | |
Definition at line 27 of file DWARFFormValue.h.
Enumerator | |
---|---|
FC_Unknown | |
FC_Address | |
FC_Block | |
FC_Constant | |
FC_String | |
FC_Flag | |
FC_Reference | |
FC_Indirect | |
FC_SectionOffset | |
FC_Exprloc |
Definition at line 29 of file DWARFFormValue.h.
|
inline |
Context for extract time.
Definition at line 60 of file DWARFFormValue.h.
void DWARFFormValue::dump | ( | raw_ostream & | OS, |
DIDumpOptions | DumpOpts = DIDumpOptions() |
||
) | const |
Definition at line 357 of file DWARFFormValue.cpp.
References llvm::Address, llvm::format(), llvm::WithColor::get(), llvm::Optional< T >::getValue(), llvm::Optional< T >::hasValue(), llvm::None, llvm::nulls(), llvm::DIDumpOptions::ShowAddresses, llvm::String, llvm::DIDumpOptions::Verbose, and llvm::raw_ostream::write_escaped().
Referenced by llvm::DWARFDebugLine::Prologue::dump(), dumpAttribute(), dumpLocation(), and getUnit().
|
static |
Definition at line 342 of file DWARFFormValue.cpp.
References llvm::format(), llvm::DWARFObject::getSectionNames(), and llvm::DIDumpOptions::Verbose.
Referenced by dumpRanges(), and getUnit().
void DWARFFormValue::dumpSectionedAddress | ( | raw_ostream & | OS, |
DIDumpOptions | DumpOpts, | ||
SectionedAddress | SA | ||
) | const |
Definition at line 334 of file DWARFFormValue.cpp.
References llvm::SectionedAddress::Address, llvm::format(), and llvm::SectionedAddress::SectionIndex.
Referenced by getUnit().
bool DWARFFormValue::extractValue | ( | const DWARFDataExtractor & | Data, |
uint32_t * | OffsetPtr, | ||
dwarf::FormParams | FormParams, | ||
const DWARFContext * | Context = nullptr , |
||
const DWARFUnit * | Unit = nullptr |
||
) |
Extracts a value in Data
at offset *OffsetPtr
.
The information in FormParams
is needed to interpret some forms. The optional Context
and Unit
allows extracting information if the form refers to other sections (e.g., .debug_str).
Definition at line 205 of file DWARFFormValue.cpp.
References llvm::dwarf::FormParams::AddrSize, C, llvm::StringRef::data(), llvm::StringRef::empty(), llvm::DWARFUnit::getContext(), llvm::DataExtractor::getCStr(), llvm::DataExtractor::getData(), llvm::dwarf::FormParams::getDwarfOffsetByteSize(), llvm::dwarf::FormParams::getRefAddrByteSize(), llvm::DWARFDataExtractor::getRelocatedValue(), llvm::DataExtractor::getSLEB128(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU24(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU64(), llvm::DataExtractor::getU8(), llvm::DataExtractor::getULEB128(), llvm_unreachable, Size, and llvm::StringRef::substr().
Referenced by dumpAttribute(), extractValue(), llvm::DWARFAbbreviationDeclaration::getAttributeValue(), getUnit(), parseV5DirFileTables(), and llvm::AppleAcceleratorTable::readAtoms().
|
inline |
Definition at line 91 of file DWARFFormValue.h.
References extractValue().
Optional< uint64_t > DWARFFormValue::getAsAddress | ( | ) | const |
Definition at line 589 of file DWARFFormValue.cpp.
References llvm::None.
Definition at line 662 of file DWARFFormValue.cpp.
References llvm::makeArrayRef(), and llvm::None.
Referenced by dumpLocation(), llvm::DWARFVerifier::handleDebugInfo(), isVariableIndexable(), and parseV5DirFileTables().
Definition at line 552 of file DWARFFormValue.cpp.
References C, and llvm::None.
Referenced by llvm::DWARFDebugLine::LineTable::getFileNameByIndex(), and llvm::DWARFDebugLine::LineTable::hasFileAtIndex().
Optional< uint64_t > DWARFFormValue::getAsCStringOffset | ( | ) | const |
Definition at line 669 of file DWARFFormValue.cpp.
References llvm::None.
Optional< uint64_t > DWARFFormValue::getAsReference | ( | ) | const |
getAsFoo functions below return the extracted value as Foo if only DWARFFormValue has form class is suitable for representing Foo.
Definition at line 609 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by llvm::DWARFVerifier::handleDebugInfo().
Optional< uint64_t > DWARFFormValue::getAsReferenceUVal | ( | ) | const |
Definition at line 675 of file DWARFFormValue.cpp.
References llvm::None.
Optional< SectionedAddress > DWARFFormValue::getAsSectionedAddress | ( | ) | const |
Definition at line 594 of file DWARFFormValue.cpp.
References llvm::None.
Optional< uint64_t > DWARFFormValue::getAsSectionOffset | ( | ) | const |
Definition at line 630 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by dumpAttribute(), dumpLocation(), llvm::DWARFDie::getAddressRanges(), llvm::DWARFVerifier::handleDebugInfo(), isVariableIndexable(), and llvm::AppleAcceleratorTable::readAtoms().
Optional< int64_t > DWARFFormValue::getAsSignedConstant | ( | ) | const |
Definition at line 643 of file DWARFFormValue.cpp.
References llvm::max(), and llvm::None.
Optional< uint64_t > DWARFFormValue::getAsUnsignedConstant | ( | ) | const |
Definition at line 636 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by dumpAttribute(), llvm::AppleAcceleratorTable::Entry::getTag(), parseV5DirFileTables(), and llvm::AppleAcceleratorTable::readAtoms().
|
inline |
Definition at line 62 of file DWARFFormValue.h.
Referenced by dumpAttribute(), llvm::DWARFDie::getAddressRanges(), llvm::DWARFVerifier::handleDebugInfo(), llvm::AppleAcceleratorTable::readAtoms(), and llvm::AppleAcceleratorTable::validateForms().
|
inline |
Definition at line 63 of file DWARFFormValue.h.
Referenced by llvm::DWARFVerifier::handleDebugInfo(), and llvm::AppleAcceleratorTable::readAtoms().
Definition at line 75 of file DWARFFormValue.h.
References Context, llvm::Data, dump(), dumpAddressSection(), dumpSectionedAddress(), extractValue(), and Unit.
bool DWARFFormValue::isFormClass | ( | DWARFFormValue::FormClass | FC | ) | const |
Definition at line 179 of file DWARFFormValue.cpp.
References DWARF5FormClasses, llvm::makeArrayRef(), and llvm::size().
Referenced by dumpLocation(), setBlockValue(), and llvm::AppleAcceleratorTable::validateForms().
|
inline |
Definition at line 96 of file DWARFFormValue.h.
Definition at line 69 of file DWARFFormValue.h.
References llvm::ArrayRef< T >::data(), R600_InstFlag::FC, isFormClass(), setUValue(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 64 of file DWARFFormValue.h.
References F().
Referenced by llvm::DWARFDebugLine::LineTable::parse(), and parseV2DirFileTables().
Definition at line 67 of file DWARFFormValue.h.
Referenced by llvm::DWARFDebugLine::LineTable::parse(), and parseV2DirFileTables().
|
inline |
Definition at line 66 of file DWARFFormValue.h.
Referenced by llvm::DWARFAbbreviationDeclaration::getAttributeValue().
|
inline |
Definition at line 65 of file DWARFFormValue.h.
Referenced by dumpAttribute(), and setBlockValue().
|
inline |
Skip a form's value in DebugInfoData
at the offset specified by OffsetPtr
.
Skips the bytes for the current form and updates the offset.
DebugInfoData | The data where we want to skip the value. |
OffsetPtr | A reference to the offset that will be updated. |
Params | DWARF parameters to help interpret forms. |
Definition at line 122 of file DWARFFormValue.h.
Referenced by llvm::DWARFDebugInfoEntry::extractFast(), llvm::DWARFAbbreviationDeclaration::getAttributeValue(), and parseV5DirFileTables().
|
static |
Skip a form's value in DebugInfoData
at the offset specified by OffsetPtr
.
Skips the bytes for the specified form and updates the offset.
Form | The DW_FORM enumeration that indicates the form to skip. |
DebugInfoData | The data where we want to skip the value. |
OffsetPtr | A reference to the offset that will be updated. |
FormParams | DWARF parameters to help interpret forms. |
Definition at line 81 of file DWARFFormValue.cpp.
References llvm::DataExtractor::getCStr(), llvm::dwarf::getFixedFormByteSize(), llvm::DataExtractor::getSLEB128(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU8(), llvm::DataExtractor::getULEB128(), and llvm::size().