|
LLVM
5.0.0
|
#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 Optional< uint8_t > | getFixedByteSize (dwarf::Form Form, const DWARFFormParams FormParams) |
| Get the fixed byte size for a given form. More... | |
| static bool | skipValue (dwarf::Form Form, DataExtractor DebugInfoData, uint32_t *OffsetPtr, const DWARFFormParams FormParams) |
Skip a form's value in DebugInfoData at the offset specified by OffsetPtr. More... | |
Definition at line 54 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 56 of file DWARFFormValue.h.
|
inline |
Remember the DWARFUnit at extract time.
Definition at line 87 of file DWARFFormValue.h.
| void DWARFFormValue::dump | ( | raw_ostream & | OS | ) | const |
Definition at line 399 of file DWARFFormValue.cpp.
References llvm::dwarf::syntax::Address, llvm::format(), llvm::dwarf::syntax::WithColor::get(), and llvm::raw_ostream::write_escaped().
Referenced by dumpAttribute().
| bool DWARFFormValue::extractValue | ( | const DWARFDataExtractor & | Data, |
| uint32_t * | OffsetPtr, | ||
| const DWARFUnit * | U | ||
| ) |
Extracts a value in Data at offset *OffsetPtr.
The passed DWARFUnit is allowed to be nullptr, in which case some kind of forms that depend on Unit information are disallowed.
| Data | The DWARFDataExtractor to use. |
| OffsetPtr | The offset within Data where the data starts. |
| U | The optional DWARFUnit supplying information for some forms. |
Definition at line 278 of file DWARFFormValue.cpp.
References llvm::StringRef::data(), llvm::StringRef::empty(), llvm::DataExtractor::getCStr(), llvm::DataExtractor::getData(), 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(), llvm::AMDGPU::CodeObject::Kernel::Arg::Key::Size, and llvm::StringRef::substr().
Referenced by dumpAttribute(), llvm::DWARFAbbreviationDeclaration::getAttributeValue(), parseV5DirFileTables(), and llvm::DWARFAcceleratorTable::readAtoms().
| Optional< uint64_t > DWARFFormValue::getAsAddress | ( | ) | const |
Definition at line 584 of file DWARFFormValue.cpp.
References llvm::None.
Definition at line 650 of file DWARFFormValue.cpp.
References llvm::makeArrayRef(), and llvm::None.
Definition at line 561 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by parseV5DirFileTables().
| Optional< uint64_t > DWARFFormValue::getAsCStringOffset | ( | ) | const |
Definition at line 656 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 597 of file DWARFFormValue.cpp.
References llvm::None.
| Optional< uint64_t > DWARFFormValue::getAsReferenceUVal | ( | ) | const |
Definition at line 662 of file DWARFFormValue.cpp.
References llvm::None.
| Optional< uint64_t > DWARFFormValue::getAsSectionOffset | ( | ) | const |
Definition at line 618 of file DWARFFormValue.cpp.
References llvm::None.
| Optional< int64_t > DWARFFormValue::getAsSignedConstant | ( | ) | const |
Definition at line 631 of file DWARFFormValue.cpp.
References llvm::max(), and llvm::None.
| Optional< uint64_t > DWARFFormValue::getAsUnsignedConstant | ( | ) | const |
Definition at line 624 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by dumpAttribute(), parseV5DirFileTables(), and llvm::DWARFAcceleratorTable::readAtoms().
|
static |
Get the fixed byte size for a given form.
If the form has a fixed byte size, then an Optional with a value will be returned. If the form is always encoded using a variable length storage format (ULEB or SLEB numbers or blocks) then None will be returned.
| Form | DWARF form to get the fixed byte size for. |
| FormParams | DWARF parameters to help interpret forms. |
Form doesn't have a fixed byte size. Definition at line 63 of file DWARFFormValue.cpp.
References llvm::DWARFFormParams::AddrSize, assert(), llvm::DWARFFormParams::getDwarfOffsetByteSize(), llvm::DWARFFormParams::getRefAddrByteSize(), llvm_unreachable(), llvm::None, and llvm::DWARFFormParams::Version.
Referenced by llvm::DWARFAbbreviationDeclaration::extract(), llvm::DWARFAbbreviationDeclaration::AttributeSpec::getByteSize(), and skipValue().
|
inline |
Definition at line 89 of file DWARFFormValue.h.
Referenced by llvm::DWARFAcceleratorTable::validateForms().
|
inline |
Definition at line 90 of file DWARFFormValue.h.
|
inline |
Definition at line 91 of file DWARFFormValue.h.
Definition at line 103 of file DWARFFormValue.h.
| bool DWARFFormValue::isFormClass | ( | DWARFFormValue::FormClass | FC | ) | const |
Definition at line 244 of file DWARFFormValue.cpp.
References DWARF4FormClasses, and llvm::makeArrayRef().
Referenced by llvm::DWARFAcceleratorTable::validateForms().
|
inline |
Definition at line 117 of file DWARFFormValue.h.
Definition at line 97 of file DWARFFormValue.h.
References llvm::ArrayRef< T >::data(), setUValue(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 92 of file DWARFFormValue.h.
References F.
Definition at line 95 of file DWARFFormValue.h.
|
inline |
Definition at line 94 of file DWARFFormValue.h.
Referenced by llvm::DWARFAbbreviationDeclaration::getAttributeValue().
|
inline |
Definition at line 93 of file DWARFFormValue.h.
Referenced by 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 155 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 147 of file DWARFFormValue.cpp.
References llvm::DataExtractor::getCStr(), getFixedByteSize(), llvm::DataExtractor::getSLEB128(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU8(), and llvm::DataExtractor::getULEB128().
1.8.6