|
LLVM
10.0.0
|
#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
Classes | |
| struct | UnitOffset |
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 DWARFFormValue | createFromSValue (dwarf::Form F, int64_t V) |
| static DWARFFormValue | createFromUValue (dwarf::Form F, uint64_t V) |
| static DWARFFormValue | createFromPValue (dwarf::Form F, const char *V) |
| static DWARFFormValue | createFromBlockValue (dwarf::Form F, ArrayRef< uint8_t > D) |
| static DWARFFormValue | createFromUnit (dwarf::Form F, const DWARFUnit *Unit, uint64_t *OffsetPtr) |
| static void | dumpAddressSection (const DWARFObject &Obj, raw_ostream &OS, DIDumpOptions DumpOpts, uint64_t SectionIndex) |
| static bool | skipValue (dwarf::Form Form, DataExtractor DebugInfoData, uint64_t *OffsetPtr, const dwarf::FormParams FormParams) |
Skip a form's value in DebugInfoData at the offset specified by OffsetPtr. More... | |
Definition at line 26 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 28 of file DWARFFormValue.h.
|
inline |
Definition at line 65 of file DWARFFormValue.h.
References createFromBlockValue(), createFromPValue(), createFromSValue(), createFromUnit(), createFromUValue(), and D.
|
static |
Definition at line 92 of file DWARFFormValue.cpp.
References llvm::ArrayRef< T >::data(), and llvm::ArrayRef< T >::size().
Referenced by DWARFFormValue().
|
static |
Definition at line 88 of file DWARFFormValue.cpp.
Referenced by DWARFFormValue(), llvm::DWARFDebugLine::LineTable::parse(), and parseV2DirFileTables().
|
static |
Definition at line 80 of file DWARFFormValue.cpp.
Referenced by DWARFFormValue(), and llvm::DWARFAbbreviationDeclaration::getAttributeValue().
|
static |
Definition at line 100 of file DWARFFormValue.cpp.
References extractValue(), llvm::DWARFUnit::getDebugInfoExtractor(), and llvm::DWARFUnit::getFormParams().
Referenced by dumpAttribute(), and DWARFFormValue().
|
static |
Definition at line 84 of file DWARFFormValue.cpp.
Referenced by dumpAttribute(), and DWARFFormValue().
| void DWARFFormValue::dump | ( | raw_ostream & | OS, |
| DIDumpOptions | DumpOpts = DIDumpOptions() |
||
| ) | const |
Definition at line 389 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 374 of file DWARFFormValue.cpp.
References llvm::format(), llvm::DWARFObject::getSectionNames(), and llvm::DIDumpOptions::Verbose.
Referenced by llvm::DWARFAddressRange::dump(), llvm::DWARFDebugLoc::dumpRawEntry(), llvm::DWARFDebugLoclists::dumpRawEntry(), and getUnit().
| void DWARFFormValue::dumpSectionedAddress | ( | raw_ostream & | OS, |
| DIDumpOptions | DumpOpts, | ||
| object::SectionedAddress | SA | ||
| ) | const |
Definition at line 366 of file DWARFFormValue.cpp.
References llvm::object::SectionedAddress::Address, llvm::format(), and llvm::object::SectionedAddress::SectionIndex.
Referenced by getUnit().
| bool DWARFFormValue::extractValue | ( | const DWARFDataExtractor & | Data, |
| uint64_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 236 of file DWARFFormValue.cpp.
References llvm::dwarf::FormParams::AddrSize, llvm::StringRef::bytes_begin(), C, 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 createFromUnit(), extractValue(), llvm::DWARFAbbreviationDeclaration::getAttributeValue(), getUnit(), parseV5DirFileTables(), and llvm::AppleAcceleratorTable::readAtoms().
|
inline |
Definition at line 95 of file DWARFFormValue.h.
References extractValue().
| Optional< uint64_t > DWARFFormValue::getAsAddress | ( | ) | const |
Definition at line 627 of file DWARFFormValue.cpp.
References llvm::None.
Definition at line 708 of file DWARFFormValue.cpp.
References llvm::makeArrayRef(), and llvm::None.
Referenced by dumpLocation(), llvm::DWARFDie::getLocations(), and parseV5DirFileTables().
Definition at line 590 of file DWARFFormValue.cpp.
References C, and llvm::None.
Referenced by llvm::DWARFDebugLine::Prologue::getFileNameByIndex(), and llvm::DWARFDebugLine::LineTable::lookupAddressRange().
| Optional< uint64_t > DWARFFormValue::getAsCStringOffset | ( | ) | const |
Definition at line 715 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 649 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by llvm::DWARFVerifier::handleDebugInfo().
| Optional< uint64_t > DWARFFormValue::getAsReferenceUVal | ( | ) | const |
Definition at line 721 of file DWARFFormValue.cpp.
References llvm::None.
| Optional< DWARFFormValue::UnitOffset > DWARFFormValue::getAsRelativeReference | ( | ) | const |
Definition at line 655 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by llvm::DWARFDie::getAttributeValueAsReferencedDie().
| Optional< object::SectionedAddress > DWARFFormValue::getAsSectionedAddress | ( | ) | const |
Definition at line 634 of file DWARFFormValue.cpp.
References llvm::None.
| Optional< uint64_t > DWARFFormValue::getAsSectionOffset | ( | ) | const |
Definition at line 676 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by dumpAttribute(), dumpLocation(), llvm::DWARFDie::getAddressRanges(), llvm::DWARFDie::getLocations(), llvm::DWARFVerifier::handleDebugInfo(), and llvm::AppleAcceleratorTable::readAtoms().
| Optional< int64_t > DWARFFormValue::getAsSignedConstant | ( | ) | const |
Definition at line 689 of file DWARFFormValue.cpp.
References llvm::max(), and llvm::None.
| Optional< uint64_t > DWARFFormValue::getAsUnsignedConstant | ( | ) | const |
Definition at line 682 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by dumpAttribute(), llvm::AppleAcceleratorTable::Entry::getTag(), parseV5DirFileTables(), and llvm::AppleAcceleratorTable::readAtoms().
|
inline |
Definition at line 75 of file DWARFFormValue.h.
Referenced by dumpAttribute(), dumpLocation(), llvm::DWARFDie::getAddressRanges(), llvm::DWARFDie::getLocations(), llvm::DWARFVerifier::handleDebugInfo(), llvm::AppleAcceleratorTable::readAtoms(), and llvm::AppleAcceleratorTable::validateForms().
|
inline |
Definition at line 76 of file DWARFFormValue.h.
References R600_InstFlag::FC, and isFormClass().
Referenced by llvm::DWARFVerifier::handleDebugInfo(), and llvm::AppleAcceleratorTable::readAtoms().
Definition at line 79 of file DWARFFormValue.h.
References Context, llvm::Data, dump(), dumpAddressSection(), dumpSectionedAddress(), and extractValue().
| bool DWARFFormValue::isFormClass | ( | DWARFFormValue::FormClass | FC | ) | const |
Definition at line 206 of file DWARFFormValue.cpp.
References DWARF5FormClasses, llvm::makeArrayRef(), and llvm::size().
Referenced by dumpLocation(), getRawUValue(), and llvm::AppleAcceleratorTable::validateForms().
|
inline |
Definition at line 100 of file DWARFFormValue.h.
|
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 131 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 108 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().
1.8.13