LLVM API Documentation
#include <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 } |
Public Member Functions | |
DWARFFormValue (uint16_t Form=0) | |
uint16_t | getForm () const |
bool | isFormClass (FormClass FC) const |
void | dump (raw_ostream &OS, const DWARFUnit *U) const |
bool | extractValue (DataExtractor data, uint32_t *offset_ptr, const DWARFUnit *u) |
bool | isInlinedCStr () const |
Optional< uint64_t > | getAsReference (const DWARFUnit *U) const |
Optional< uint64_t > | getAsUnsignedConstant () const |
Optional< const char * > | getAsCString (const DWARFUnit *U) const |
Optional< uint64_t > | getAsAddress (const DWARFUnit *U) const |
Optional< uint64_t > | getAsSectionOffset () const |
bool | skipValue (DataExtractor debug_info_data, uint32_t *offset_ptr, const DWARFUnit *u) const |
Static Public Member Functions | |
static bool | skipValue (uint16_t form, DataExtractor debug_info_data, uint32_t *offset_ptr, const DWARFUnit *u) |
static ArrayRef< uint8_t > | getFixedFormSizes (uint8_t AddrSize, uint16_t Version) |
Definition at line 22 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 24 of file DWARFFormValue.h.
|
inline |
Definition at line 55 of file DWARFFormValue.h.
void DWARFFormValue::dump | ( | raw_ostream & | OS, |
const DWARFUnit * | U | ||
) | const |
Definition at line 362 of file DWARFFormValue.cpp.
References llvm::format(), llvm::DWARFUnit::getAddrOffsetSectionItem(), llvm::DWARFUnit::getOffset(), llvm::DWARFUnit::getStringOffsetSection(), llvm::DWARFUnit::getStringSection(), llvm::Optional< T >::getValue(), llvm::Optional< T >::hasValue(), and llvm::raw_ostream::write_escaped().
Referenced by llvm::DWARFDebugInfoEntryMinimal::dumpAttribute().
bool DWARFFormValue::extractValue | ( | DataExtractor | data, |
uint32_t * | offset_ptr, | ||
const DWARFUnit * | u | ||
) |
Definition at line 130 of file DWARFFormValue.cpp.
References llvm::StringRef::data(), llvm::StringRef::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), llvm::DWARFUnit::getAddressByteSize(), llvm::DataExtractor::getCStr(), llvm::DataExtractor::getData(), llvm::DWARFUnit::getRelocMap(), llvm::DataExtractor::getSLEB128(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU64(), llvm::DataExtractor::getU8(), llvm::DataExtractor::getULEB128(), llvm::DataExtractor::getUnsigned(), llvm::DWARFUnit::getVersion(), and llvm::StringRef::substr().
Referenced by llvm::DWARFDebugInfoEntryMinimal::dumpAttribute(), and llvm::DWARFDebugInfoEntryMinimal::getAttributeValue().
Definition at line 506 of file DWARFFormValue.cpp.
References llvm::DWARFUnit::getAddrOffsetSectionItem(), and llvm::None.
Referenced by llvm::DWARFDebugInfoEntryMinimal::getAttributeValueAsAddress().
Definition at line 486 of file DWARFFormValue.cpp.
References llvm::DataExtractor::getCStr(), llvm::DWARFUnit::getStringExtractor(), llvm::DWARFUnit::getStringOffsetSectionItem(), and llvm::None.
Referenced by llvm::DWARFDebugInfoEntryMinimal::getAttributeValueAsString().
getAsFoo functions below return the extracted value as Foo if only DWARFFormValue has form class is suitable for representing Foo.
Definition at line 519 of file DWARFFormValue.cpp.
References llvm::DWARFUnit::getOffset(), and llvm::None.
Referenced by llvm::DWARFDebugInfoEntryMinimal::getAttributeValueAsReference().
Optional< uint64_t > DWARFFormValue::getAsSectionOffset | ( | ) | const |
Definition at line 539 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by llvm::DWARFDebugInfoEntryMinimal::getAttributeValueAsSectionOffset().
Optional< uint64_t > DWARFFormValue::getAsUnsignedConstant | ( | ) | const |
Definition at line 545 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by llvm::DWARFDebugInfoEntryMinimal::getAttributeValueAsUnsignedConstant().
|
static |
Definition at line 63 of file DWARFFormValue.cpp.
References llvm::None.
Referenced by llvm::DWARFDebugInfoEntryMinimal::extractFast().
|
inline |
Definition at line 56 of file DWARFFormValue.h.
bool DWARFFormValue::isFormClass | ( | DWARFFormValue::FormClass | FC | ) | const |
Definition at line 108 of file DWARFFormValue.cpp.
References DWARF4FormClasses.
|
inline |
Definition at line 62 of file DWARFFormValue.h.
bool DWARFFormValue::skipValue | ( | DataExtractor | debug_info_data, |
uint32_t * | offset_ptr, | ||
const DWARFUnit * | u | ||
) | const |
Definition at line 255 of file DWARFFormValue.cpp.
Referenced by llvm::DWARFDebugInfoEntryMinimal::extractFast(), and llvm::DWARFDebugInfoEntryMinimal::getAttributeValue().
|
static |