LLVM  8.0.0svn
Classes | Enumerations | Functions | Variables
llvm::dwarf Namespace Reference

Classes

class  CFIProgram
 Represent a sequence of Call Frame Information instructions that, when read in order, construct a table mapping PC to frame state. More...
 
class  CIE
 DWARF Common Information Entry (CIE) More...
 
struct  EnumTraits
 
struct  EnumTraits< Attribute >
 
struct  EnumTraits< Form >
 
struct  EnumTraits< Index >
 
struct  EnumTraits< Tag >
 
class  FDE
 DWARF Frame Description Entry (FDE) More...
 
struct  FormParams
 A helper struct providing information about the byte size of DW_FORM values that vary in size depending on the DWARF version, address byte size, or DWARF32/DWARF64. More...
 
class  FrameEntry
 An entry in either debug_frame or eh_frame. More...
 
struct  PubIndexEntryDescriptor
 Describes an entry of the various gnu_pub* debug sections. More...
 

Enumerations

enum  LLVMConstants : uint32_t {
  DW_TAG_invalid = ~0U, DW_VIRTUALITY_invalid = ~0U, DW_MACINFO_invalid = ~0U, DWARF_VERSION = 4,
  DW_PUBTYPES_VERSION = 2, DW_PUBNAMES_VERSION = 2, DW_ARANGES_VERSION = 2, DWARF_VENDOR_DWARF = 0,
  DWARF_VENDOR_APPLE = 1, DWARF_VENDOR_BORLAND = 2, DWARF_VENDOR_GNU = 3, DWARF_VENDOR_GOOGLE = 4,
  DWARF_VENDOR_LLVM = 5, DWARF_VENDOR_MIPS = 6
}
 
enum  DwarfFormat : uint8_t { DWARF32, DWARF64 }
 Constants that define the DWARF format as 32 or 64 bit. More...
 
enum  Tag : uint16_t { DW_TAG_lo_user = 0x4080, DW_TAG_hi_user = 0xffff, DW_TAG_user_base = 0x1000 }
 
enum  Attribute : uint16_t { DW_AT_lo_user = 0x2000, DW_AT_hi_user = 0x3fff }
 Attributes. More...
 
enum  Form : uint16_t { DW_FORM_lo_user = 0x1f00 }
 
enum  LocationAtom { DW_OP_lo_user = 0xe0, DW_OP_hi_user = 0xff, DW_OP_LLVM_fragment = 0x1000 }
 
enum  TypeKind : uint8_t { DW_ATE_lo_user = 0x80, DW_ATE_hi_user = 0xff }
 
enum  DecimalSignEncoding {
  DW_DS_unsigned = 0x01, DW_DS_leading_overpunch = 0x02, DW_DS_trailing_overpunch = 0x03, DW_DS_leading_separate = 0x04,
  DW_DS_trailing_separate = 0x05
}
 
enum  EndianityEncoding { DW_END_lo_user = 0x40, DW_END_hi_user = 0xff }
 
enum  AccessAttribute { DW_ACCESS_public = 0x01, DW_ACCESS_protected = 0x02, DW_ACCESS_private = 0x03 }
 
enum  VisibilityAttribute { DW_VIS_local = 0x01, DW_VIS_exported = 0x02, DW_VIS_qualified = 0x03 }
 
enum  VirtualityAttribute { DW_VIRTUALITY_max = 0x02 }
 
enum  DefaultedMemberAttribute { DW_DEFAULTED_max = 0x02 }
 
enum  SourceLanguage { DW_LANG_lo_user = 0x8000, DW_LANG_hi_user = 0xffff }
 
enum  CaseSensitivity { DW_ID_case_sensitive = 0x00, DW_ID_up_case = 0x01, DW_ID_down_case = 0x02, DW_ID_case_insensitive = 0x03 }
 
enum  CallingConvention { DW_CC_lo_user = 0x40, DW_CC_hi_user = 0xff }
 
enum  InlineAttribute { DW_INL_not_inlined = 0x00, DW_INL_inlined = 0x01, DW_INL_declared_not_inlined = 0x02, DW_INL_declared_inlined = 0x03 }
 
enum  ArrayDimensionOrdering { DW_ORD_row_major = 0x00, DW_ORD_col_major = 0x01 }
 
enum  DiscriminantList { DW_DSC_label = 0x00, DW_DSC_range = 0x01 }
 
enum  LineNumberOps : uint8_t
 Line Number Standard Opcode Encodings. More...
 
enum  LineNumberExtendedOps { DW_LNE_lo_user = 0x80, DW_LNE_hi_user = 0xff }
 Line Number Extended Opcode Encodings. More...
 
enum  LineNumberEntryFormat { DW_LNCT_lo_user = 0x2000, DW_LNCT_hi_user = 0x3fff }
 
enum  MacinfoRecordType {
  DW_MACINFO_define = 0x01, DW_MACINFO_undef = 0x02, DW_MACINFO_start_file = 0x03, DW_MACINFO_end_file = 0x04,
  DW_MACINFO_vendor_ext = 0xff
}
 
enum  MacroEntryType { DW_MACRO_lo_user = 0xe0, DW_MACRO_hi_user = 0xff }
 DWARF v5 macro information entry type encodings. More...
 
enum  RangeListEntries
 DWARF v5 range list entry encoding values. More...
 
enum  CallFrameInfo { DW_CFA_extended = 0x00, DW_CFA_lo_user = 0x1c, DW_CFA_hi_user = 0x3f }
 Call frame instruction encodings. More...
 
enum  Constants {
  DW_CHILDREN_no = 0x00, DW_CHILDREN_yes = 0x01, DW_EH_PE_absptr = 0x00, DW_EH_PE_omit = 0xff,
  DW_EH_PE_uleb128 = 0x01, DW_EH_PE_udata2 = 0x02, DW_EH_PE_udata4 = 0x03, DW_EH_PE_udata8 = 0x04,
  DW_EH_PE_sleb128 = 0x09, DW_EH_PE_sdata2 = 0x0A, DW_EH_PE_sdata4 = 0x0B, DW_EH_PE_sdata8 = 0x0C,
  DW_EH_PE_signed = 0x08, DW_EH_PE_pcrel = 0x10, DW_EH_PE_textrel = 0x20, DW_EH_PE_datarel = 0x30,
  DW_EH_PE_funcrel = 0x40, DW_EH_PE_aligned = 0x50, DW_EH_PE_indirect = 0x80
}
 
enum  LocationListEntry : unsigned char {
  DW_LLE_end_of_list = 0x00, DW_LLE_base_addressx = 0x01, DW_LLE_startx_endx = 0x02, DW_LLE_startx_length = 0x03,
  DW_LLE_offset_pair = 0x04, DW_LLE_default_location = 0x05, DW_LLE_base_address = 0x06, DW_LLE_start_end = 0x07,
  DW_LLE_start_length = 0x08
}
 Constants for location lists in DWARF v5. More...
 
enum  ApplePropertyAttributes
 Constants for the DW_APPLE_PROPERTY_attributes attribute. More...
 
enum  UnitType : unsigned char { DW_UT_lo_user = 0x80, DW_UT_hi_user = 0xff }
 Constants for unit types in DWARF v5. More...
 
enum  Index { DW_IDX_lo_user = 0x2000, DW_IDX_hi_user = 0x3fff }
 
enum  AcceleratorTable {
  DW_ATOM_null = 0u, DW_ATOM_die_offset = 1u, DW_ATOM_cu_offset = 2u, DW_ATOM_die_tag = 3u,
  DW_ATOM_type_flags = 4u, DW_ATOM_type_type_flags = 5u, DW_ATOM_qual_name_hash = 6u, DW_FLAG_type_implementation = 2u,
  DW_hash_function_djb = 0u
}
 
enum  GDBIndexEntryKind {
  GIEK_NONE, GIEK_TYPE, GIEK_VARIABLE, GIEK_FUNCTION,
  GIEK_OTHER, GIEK_UNUSED5, GIEK_UNUSED6, GIEK_UNUSED7
}
 
enum  GDBIndexEntryLinkage { GIEL_EXTERNAL, GIEL_STATIC }
 

Functions

bool isType (Tag T)
 
bool isUnitType (uint8_t UnitType)
 
bool isUnitType (dwarf::Tag T)
 
StringRef TagString (unsigned Tag)
 
StringRef ChildrenString (unsigned Children)
 
StringRef AttributeString (unsigned Attribute)
 
StringRef FormEncodingString (unsigned Encoding)
 
StringRef OperationEncodingString (unsigned Encoding)
 
StringRef AttributeEncodingString (unsigned Encoding)
 
StringRef DecimalSignString (unsigned Sign)
 
StringRef EndianityString (unsigned Endian)
 
StringRef AccessibilityString (unsigned Access)
 
StringRef VisibilityString (unsigned Visibility)
 
StringRef VirtualityString (unsigned Virtuality)
 
StringRef LanguageString (unsigned Language)
 
StringRef CaseString (unsigned Case)
 
StringRef ConventionString (unsigned Convention)
 
StringRef InlineCodeString (unsigned Code)
 
StringRef ArrayOrderString (unsigned Order)
 
StringRef LNStandardString (unsigned Standard)
 
StringRef LNExtendedString (unsigned Encoding)
 
StringRef MacinfoString (unsigned Encoding)
 
StringRef RangeListEncodingString (unsigned Encoding)
 
StringRef CallFrameString (unsigned Encoding)
 
StringRef ApplePropertyString (unsigned)
 
StringRef UnitTypeString (unsigned)
 
StringRef AtomTypeString (unsigned Atom)
 
StringRef GDBIndexEntryKindString (GDBIndexEntryKind Kind)
 
StringRef GDBIndexEntryLinkageString (GDBIndexEntryLinkage Linkage)
 
StringRef IndexString (unsigned Idx)
 
unsigned getTag (StringRef TagString)
 
unsigned getOperationEncoding (StringRef OperationEncodingString)
 
unsigned getVirtuality (StringRef VirtualityString)
 
unsigned getLanguage (StringRef LanguageString)
 
unsigned getCallingConvention (StringRef LanguageString)
 
unsigned getAttributeEncoding (StringRef EncodingString)
 
unsigned getMacinfo (StringRef MacinfoString)
 
unsigned TagVersion (Tag T)
 
unsigned AttributeVersion (Attribute A)
 
unsigned FormVersion (Form F)
 
unsigned OperationVersion (LocationAtom O)
 
unsigned AttributeEncodingVersion (TypeKind E)
 
unsigned LanguageVersion (SourceLanguage L)
 
unsigned TagVendor (Tag T)
 
unsigned AttributeVendor (Attribute A)
 
unsigned FormVendor (Form F)
 
unsigned OperationVendor (LocationAtom O)
 
unsigned AttributeEncodingVendor (TypeKind E)
 
unsigned LanguageVendor (SourceLanguage L)
 
Optional< uint8_t > getFixedFormByteSize (dwarf::Form Form, FormParams Params)
 Get the fixed byte size for a given form. More...
 
bool isValidFormForVersion (Form F, unsigned Version, bool ExtensionsOk=true)
 Tells whether the specified form is defined in the specified version, or is an extension if extensions are allowed. More...
 
StringRef AttributeValueString (uint16_t Attr, unsigned Val)
 Returns the symbolic string representing Val when used as a value for attribute Attr. More...
 
StringRef AtomValueString (uint16_t Atom, unsigned Val)
 Returns the symbolic string representing Val when used as a value for atom Atom. More...
 
Optional< const char * > toString (const Optional< DWARFFormValue > &V)
 Take an optional DWARFFormValue and try to extract a string value from it. More...
 
const chartoString (const Optional< DWARFFormValue > &V, const char *Default)
 Take an optional DWARFFormValue and extract a string value from it. More...
 
Optional< uint64_t > toUnsigned (const Optional< DWARFFormValue > &V)
 Take an optional DWARFFormValue and try to extract an unsigned constant. More...
 
uint64_t toUnsigned (const Optional< DWARFFormValue > &V, uint64_t Default)
 Take an optional DWARFFormValue and extract a unsigned constant. More...
 
Optional< uint64_t > toReference (const Optional< DWARFFormValue > &V)
 Take an optional DWARFFormValue and try to extract an reference. More...
 
uint64_t toReference (const Optional< DWARFFormValue > &V, uint64_t Default)
 Take an optional DWARFFormValue and extract a reference. More...
 
Optional< int64_t > toSigned (const Optional< DWARFFormValue > &V)
 Take an optional DWARFFormValue and try to extract an signed constant. More...
 
int64_t toSigned (const Optional< DWARFFormValue > &V, int64_t Default)
 Take an optional DWARFFormValue and extract a signed integer. More...
 
Optional< uint64_t > toAddress (const Optional< DWARFFormValue > &V)
 Take an optional DWARFFormValue and try to extract an address. More...
 
uint64_t toAddress (const Optional< DWARFFormValue > &V, uint64_t Default)
 Take an optional DWARFFormValue and extract a address. More...
 
Optional< uint64_t > toSectionOffset (const Optional< DWARFFormValue > &V)
 Take an optional DWARFFormValue and try to extract an section offset. More...
 
uint64_t toSectionOffset (const Optional< DWARFFormValue > &V, uint64_t Default)
 Take an optional DWARFFormValue and extract a section offset. More...
 
Optional< ArrayRef< uint8_t > > toBlock (const Optional< DWARFFormValue > &V)
 Take an optional DWARFFormValue and try to extract block data. More...
 

Variables

const uint32_t DW_INVALID_OFFSET = UINT32_MAX
 Identifier of an invalid DIE offset in the .debug_info section. More...
 
const uint32_t DW_CIE_ID = UINT32_MAX
 Special ID values that distinguish a CIE from a FDE in DWARF CFI. More...
 
const uint64_t DW64_CIE_ID = UINT64_MAX
 

Enumeration Type Documentation

◆ AcceleratorTable

Enumerator
DW_ATOM_null 
DW_ATOM_die_offset 

Marker as the end of a list of atoms.

DW_ATOM_cu_offset 
DW_ATOM_die_tag 
DW_ATOM_type_flags 
DW_ATOM_type_type_flags 
DW_ATOM_qual_name_hash 
DW_FLAG_type_implementation 
DW_hash_function_djb 

Definition at line 368 of file Dwarf.h.

◆ AccessAttribute

Enumerator
DW_ACCESS_public 
DW_ACCESS_protected 
DW_ACCESS_private 

Definition at line 159 of file Dwarf.h.

◆ ApplePropertyAttributes

Constants for the DW_APPLE_PROPERTY_attributes attribute.

Keep this list in sync with clang's DeclSpec.h ObjCPropertyAttributeKind!

Definition at line 321 of file Dwarf.h.

◆ ArrayDimensionOrdering

Enumerator
DW_ORD_row_major 
DW_ORD_col_major 

Definition at line 216 of file Dwarf.h.

◆ Attribute

enum llvm::dwarf::Attribute : uint16_t

Attributes.

Enumerator
DW_AT_lo_user 
DW_AT_hi_user 

Definition at line 114 of file Dwarf.h.

◆ CallFrameInfo

Call frame instruction encodings.

Enumerator
DW_CFA_extended 
DW_CFA_lo_user 
DW_CFA_hi_user 

Definition at line 273 of file Dwarf.h.

◆ CallingConvention

Enumerator
DW_CC_lo_user 
DW_CC_hi_user 

Definition at line 200 of file Dwarf.h.

◆ CaseSensitivity

Enumerator
DW_ID_case_sensitive 
DW_ID_up_case 
DW_ID_down_case 
DW_ID_case_insensitive 

Definition at line 192 of file Dwarf.h.

◆ Constants

Enumerator
DW_CHILDREN_no 
DW_CHILDREN_yes 
DW_EH_PE_absptr 
DW_EH_PE_omit 
DW_EH_PE_uleb128 
DW_EH_PE_udata2 
DW_EH_PE_udata4 
DW_EH_PE_udata8 
DW_EH_PE_sleb128 
DW_EH_PE_sdata2 
DW_EH_PE_sdata4 
DW_EH_PE_sdata8 
DW_EH_PE_signed 
DW_EH_PE_pcrel 
DW_EH_PE_textrel 
DW_EH_PE_datarel 
DW_EH_PE_funcrel 
DW_EH_PE_aligned 
DW_EH_PE_indirect 

Definition at line 282 of file Dwarf.h.

◆ DecimalSignEncoding

Enumerator
DW_DS_unsigned 
DW_DS_leading_overpunch 
DW_DS_trailing_overpunch 
DW_DS_leading_separate 
DW_DS_trailing_separate 

Definition at line 142 of file Dwarf.h.

◆ DefaultedMemberAttribute

Enumerator
DW_DEFAULTED_max 

Definition at line 179 of file Dwarf.h.

◆ DiscriminantList

Enumerator
DW_DSC_label 
DW_DSC_range 

Definition at line 222 of file Dwarf.h.

◆ DwarfFormat

enum llvm::dwarf::DwarfFormat : uint8_t

Constants that define the DWARF format as 32 or 64 bit.

Enumerator
DWARF32 
DWARF64 

Definition at line 65 of file Dwarf.h.

◆ EndianityEncoding

Enumerator
DW_END_lo_user 
DW_END_hi_user 

Definition at line 151 of file Dwarf.h.

◆ Form

enum llvm::dwarf::Form : uint16_t
Enumerator
DW_FORM_lo_user 

Not specified by DWARF.

Definition at line 121 of file Dwarf.h.

◆ GDBIndexEntryKind

Enumerator
GIEK_NONE 
GIEK_TYPE 
GIEK_VARIABLE 
GIEK_FUNCTION 
GIEK_OTHER 
GIEK_UNUSED5 
GIEK_UNUSED6 
GIEK_UNUSED7 

Definition at line 393 of file Dwarf.h.

◆ GDBIndexEntryLinkage

Enumerator
GIEL_EXTERNAL 
GIEL_STATIC 

Definition at line 404 of file Dwarf.h.

◆ Index

Enumerator
DW_IDX_lo_user 
DW_IDX_hi_user 

Definition at line 334 of file Dwarf.h.

◆ InlineAttribute

Enumerator
DW_INL_not_inlined 
DW_INL_inlined 
DW_INL_declared_not_inlined 
DW_INL_declared_inlined 

Definition at line 208 of file Dwarf.h.

◆ LineNumberEntryFormat

Enumerator
DW_LNCT_lo_user 
DW_LNCT_hi_user 

Definition at line 242 of file Dwarf.h.

◆ LineNumberExtendedOps

Line Number Extended Opcode Encodings.

Enumerator
DW_LNE_lo_user 
DW_LNE_hi_user 

Definition at line 235 of file Dwarf.h.

◆ LineNumberOps

Line Number Standard Opcode Encodings.

Definition at line 229 of file Dwarf.h.

◆ LLVMConstants

Enumerator
DW_TAG_invalid 
DW_VIRTUALITY_invalid 
DW_MACINFO_invalid 
DWARF_VERSION 
DW_PUBTYPES_VERSION 
DW_PUBNAMES_VERSION 
DW_ARANGES_VERSION 
DWARF_VENDOR_DWARF 
DWARF_VENDOR_APPLE 
DWARF_VENDOR_BORLAND 
DWARF_VENDOR_GNU 
DWARF_VENDOR_GOOGLE 
DWARF_VENDOR_LLVM 
DWARF_VENDOR_MIPS 

Definition at line 43 of file Dwarf.h.

◆ LocationAtom

Enumerator
DW_OP_lo_user 
DW_OP_hi_user 
DW_OP_LLVM_fragment 

Only used in LLVM metadata.

Definition at line 127 of file Dwarf.h.

◆ LocationListEntry

Constants for location lists in DWARF v5.

Enumerator
DW_LLE_end_of_list 
DW_LLE_base_addressx 
DW_LLE_startx_endx 
DW_LLE_startx_length 
DW_LLE_offset_pair 
DW_LLE_default_location 
DW_LLE_base_address 
DW_LLE_start_end 
DW_LLE_start_length 

Definition at line 307 of file Dwarf.h.

◆ MacinfoRecordType

Enumerator
DW_MACINFO_define 
DW_MACINFO_undef 
DW_MACINFO_start_file 
DW_MACINFO_end_file 
DW_MACINFO_vendor_ext 

Definition at line 249 of file Dwarf.h.

◆ MacroEntryType

DWARF v5 macro information entry type encodings.

Enumerator
DW_MACRO_lo_user 
DW_MACRO_hi_user 

Definition at line 259 of file Dwarf.h.

◆ RangeListEntries

DWARF v5 range list entry encoding values.

Definition at line 267 of file Dwarf.h.

◆ SourceLanguage

Enumerator
DW_LANG_lo_user 
DW_LANG_hi_user 

Definition at line 185 of file Dwarf.h.

◆ Tag

enum llvm::dwarf::Tag : uint16_t
Enumerator
DW_TAG_lo_user 
DW_TAG_hi_user 
DW_TAG_user_base 

Recommended base for user tags.

Definition at line 77 of file Dwarf.h.

◆ TypeKind

enum llvm::dwarf::TypeKind : uint8_t
Enumerator
DW_ATE_lo_user 
DW_ATE_hi_user 

Definition at line 135 of file Dwarf.h.

◆ UnitType

Constants for unit types in DWARF v5.

Enumerator
DW_UT_lo_user 
DW_UT_hi_user 

Definition at line 327 of file Dwarf.h.

◆ VirtualityAttribute

Enumerator
DW_VIRTUALITY_max 

Definition at line 173 of file Dwarf.h.

◆ VisibilityAttribute

Enumerator
DW_VIS_local 
DW_VIS_exported 
DW_VIS_qualified 

Definition at line 166 of file Dwarf.h.

Function Documentation

◆ AtomValueString()

StringRef llvm::dwarf::AtomValueString ( uint16_t  Atom,
unsigned  Val 
)

Returns the symbolic string representing Val when used as a value for atom Atom.

Definition at line 574 of file Dwarf.cpp.

References DW_ATOM_die_tag, DW_ATOM_null, and TagString().

Referenced by llvm::dwarf::FormParams::operator bool(), and llvm::AppleAcceleratorTable::readAtoms().

◆ AttributeValueString()

StringRef llvm::dwarf::AttributeValueString ( uint16_t  Attr,
unsigned  Val 
)

◆ getFixedFormByteSize()

Optional< uint8_t > llvm::dwarf::getFixedFormByteSize ( dwarf::Form  Form,
FormParams  Params 
)

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.

Parameters
FormDWARF form to get the fixed byte size for.
ParamsDWARF parameters to help interpret forms.
Returns
Optional<uint8_t> value with the fixed byte size or None if Form doesn't have a fixed byte size.

Definition at line 596 of file Dwarf.cpp.

References llvm::dwarf::FormParams::AddrSize, llvm::dwarf::FormParams::getDwarfOffsetByteSize(), llvm::dwarf::FormParams::getRefAddrByteSize(), and llvm::None.

Referenced by llvm::DWARFAbbreviationDeclaration::extract(), llvm::DWARFAbbreviationDeclaration::AttributeSpec::getByteSize(), llvm::dwarf::FormParams::operator bool(), llvm::DIEInteger::SizeOf(), and llvm::DWARFFormValue::skipValue().

◆ isType()

bool llvm::dwarf::isType ( Tag  T)
inline

Definition at line 85 of file Dwarf.h.

Referenced by llvm::DwarfUnit::getOrCreateStaticMemberDIE().

◆ isUnitType() [1/2]

bool llvm::dwarf::isUnitType ( uint8_t  UnitType)
inline

Definition at line 341 of file Dwarf.h.

Referenced by llvm::DWARFUnit::isMatchingUnitTypeAndTag().

◆ isUnitType() [2/2]

bool llvm::dwarf::isUnitType ( dwarf::Tag  T)
inline

Definition at line 355 of file Dwarf.h.

◆ isValidFormForVersion()

bool llvm::dwarf::isValidFormForVersion ( Form  F,
unsigned  Version,
bool  ExtensionsOk = true 
)

Tells whether the specified form is defined in the specified version, or is an extension if extensions are allowed.

Definition at line 683 of file Dwarf.cpp.

References DWARF_VENDOR_DWARF, FormVendor(), FormVersion(), and llvm::IndexedInstrProf::Version.

Referenced by llvm::DIEAbbrev::Emit(), and llvm::dwarf::FormParams::operator bool().

◆ toAddress() [1/2]

Optional<uint64_t> llvm::dwarf::toAddress ( const Optional< DWARFFormValue > &  V)
inline

Take an optional DWARFFormValue and try to extract an address.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Returns
an optional value that contains a value if the form value was valid and has a address form.

Definition at line 235 of file DWARFFormValue.h.

References llvm::None.

Referenced by llvm::DWARFUnit::getBaseAddress(), and llvm::DWARFDie::getLowAndHighPC().

◆ toAddress() [2/2]

uint64_t llvm::dwarf::toAddress ( const Optional< DWARFFormValue > &  V,
uint64_t  Default 
)
inline

Take an optional DWARFFormValue and extract a address.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Defaultthe default value to return in case of failure.
Returns
the extracted address value or Default if the V doesn't have a value or the form value's encoding wasn't an address form.

Definition at line 247 of file DWARFFormValue.h.

◆ toBlock()

Optional<ArrayRef<uint8_t> > llvm::dwarf::toBlock ( const Optional< DWARFFormValue > &  V)
inline

Take an optional DWARFFormValue and try to extract block data.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Returns
an optional value that contains a value if the form value was valid and has a block form.

Definition at line 278 of file DWARFFormValue.h.

References llvm::None.

◆ toReference() [1/2]

Optional<uint64_t> llvm::dwarf::toReference ( const Optional< DWARFFormValue > &  V)
inline

Take an optional DWARFFormValue and try to extract an reference.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Returns
an optional value that contains a value if the form value was valid and has a reference form.

Definition at line 192 of file DWARFFormValue.h.

References llvm::None.

Referenced by llvm::DWARFDie::getAttributeValueAsReferencedDie().

◆ toReference() [2/2]

uint64_t llvm::dwarf::toReference ( const Optional< DWARFFormValue > &  V,
uint64_t  Default 
)
inline

Take an optional DWARFFormValue and extract a reference.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Defaultthe default value to return in case of failure.
Returns
the extracted reference value or Default if the V doesn't have a value or the form value's encoding wasn't a reference form.

Definition at line 204 of file DWARFFormValue.h.

◆ toSectionOffset() [1/2]

Optional<uint64_t> llvm::dwarf::toSectionOffset ( const Optional< DWARFFormValue > &  V)
inline

Take an optional DWARFFormValue and try to extract an section offset.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Returns
an optional value that contains a value if the form value was valid and has a section offset form.

Definition at line 256 of file DWARFFormValue.h.

References llvm::None.

Referenced by buildLineToUnitMap(), llvm::DWARFUnit::getCompilationDir(), llvm::DWARFContext::getLineTableForUnit(), llvm::DWARFDie::getRangesBaseAttribute(), and llvm::DWARFVerifier::handleDebugInfo().

◆ toSectionOffset() [2/2]

uint64_t llvm::dwarf::toSectionOffset ( const Optional< DWARFFormValue > &  V,
uint64_t  Default 
)
inline

Take an optional DWARFFormValue and extract a section offset.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Defaultthe default value to return in case of failure.
Returns
the extracted section offset value or Default if the V doesn't have a value or the form value's encoding wasn't a section offset form.

Definition at line 268 of file DWARFFormValue.h.

◆ toSigned() [1/2]

Optional<int64_t> llvm::dwarf::toSigned ( const Optional< DWARFFormValue > &  V)
inline

Take an optional DWARFFormValue and try to extract an signed constant.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Returns
an optional value that contains a value if the form value was valid and has a signed constant form.

Definition at line 214 of file DWARFFormValue.h.

References llvm::None.

◆ toSigned() [2/2]

int64_t llvm::dwarf::toSigned ( const Optional< DWARFFormValue > &  V,
int64_t  Default 
)
inline

Take an optional DWARFFormValue and extract a signed integer.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Defaultthe default value to return in case of failure.
Returns
the extracted signed integer value or Default if the V doesn't have a value or the form value's encoding wasn't a signed integer form.

Definition at line 226 of file DWARFFormValue.h.

◆ toString() [1/2]

Optional<const char *> llvm::dwarf::toString ( const Optional< DWARFFormValue > &  V)
inline

Take an optional DWARFFormValue and try to extract a string value from it.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Returns
an optional value that contains a value if the form value was valid and was a string.

Definition at line 148 of file DWARFFormValue.h.

References llvm::None.

Referenced by dumpAttribute(), llvm::DWARFUnit::getCompilationDir(), llvm::DWARFDie::getName(), llvm::DWARFVerifier::handleDebugLine(), and isVariableIndexable().

◆ toString() [2/2]

const char* llvm::dwarf::toString ( const Optional< DWARFFormValue > &  V,
const char Default 
)
inline

Take an optional DWARFFormValue and extract a string value from it.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Defaultthe default value to return in case of failure.
Returns
the string value or Default if the V doesn't have a value or the form value's encoding wasn't a string.

Definition at line 160 of file DWARFFormValue.h.

References llvm::toString().

◆ toUnsigned() [1/2]

Optional<uint64_t> llvm::dwarf::toUnsigned ( const Optional< DWARFFormValue > &  V)
inline

Take an optional DWARFFormValue and try to extract an unsigned constant.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Returns
an optional value that contains a value if the form value was valid and has a unsigned constant form.

Definition at line 170 of file DWARFFormValue.h.

References llvm::None.

Referenced by llvm::DWARFDie::getCallerFrame(), llvm::DWARFUnit::getCompilationDir(), llvm::DWARFDie::getDeclLine(), and llvm::DWARFContext::getDWOCompileUnitForHash().

◆ toUnsigned() [2/2]

uint64_t llvm::dwarf::toUnsigned ( const Optional< DWARFFormValue > &  V,
uint64_t  Default 
)
inline

Take an optional DWARFFormValue and extract a unsigned constant.

Parameters
Vand optional DWARFFormValue to attempt to extract the value from.
Defaultthe default value to return in case of failure.
Returns
the extracted unsigned value or Default if the V doesn't have a value or the form value's encoding wasn't an unsigned constant form.

Definition at line 182 of file DWARFFormValue.h.

Variable Documentation

◆ DW64_CIE_ID

const uint64_t llvm::dwarf::DW64_CIE_ID = UINT64_MAX

Definition at line 71 of file Dwarf.h.

Referenced by llvm::DWARFDebugFrame::parse().

◆ DW_CIE_ID

const uint32_t llvm::dwarf::DW_CIE_ID = UINT32_MAX

Special ID values that distinguish a CIE from a FDE in DWARF CFI.

Not inside an enum because a 64-bit value is needed.

Definition at line 70 of file Dwarf.h.

Referenced by llvm::dwarf::CIE::dump(), and llvm::DWARFDebugFrame::parse().

◆ DW_INVALID_OFFSET

const uint32_t llvm::dwarf::DW_INVALID_OFFSET = UINT32_MAX

Identifier of an invalid DIE offset in the .debug_info section.

Definition at line 75 of file Dwarf.h.

Referenced by llvm::AppleAcceleratorTable::readAtoms().