libdwarf: Enumerators with various purposes

libdwarf

Loading...
Searching...
No Matches
Enumerations
Enumerators with various purposes

## Enumerations
enum | Dwarf_Ranges_Entry_Type { DW_RANGES_ENTRY , DW_RANGES_ADDRESS_SELECTION , DW_RANGES_END }
enum | Dwarf_Form_Class { DW_FORM_CLASS_UNKNOWN = 0 , DW_FORM_CLASS_ADDRESS = 1 , DW_FORM_CLASS_BLOCK = 2 , DW_FORM_CLASS_CONSTANT =3 , DW_FORM_CLASS_EXPRLOC = 4 , DW_FORM_CLASS_FLAG = 5 , DW_FORM_CLASS_LINEPTR = 6 , DW_FORM_CLASS_LOCLISTPTR =7 , DW_FORM_CLASS_MACPTR = 8 , DW_FORM_CLASS_RANGELISTPTR =9 , DW_FORM_CLASS_REFERENCE =10 , DW_FORM_CLASS_STRING = 11 , DW_FORM_CLASS_FRAMEPTR = 12 , DW_FORM_CLASS_MACROPTR = 13 , DW_FORM_CLASS_ADDRPTR = 14 , DW_FORM_CLASS_LOCLIST = 15 , DW_FORM_CLASS_LOCLISTSPTR =16 , DW_FORM_CLASS_RNGLIST =17 , DW_FORM_CLASS_RNGLISTSPTR =18 , DW_FORM_CLASS_STROFFSETSPTR =19 }

## Detailed Description

## Enumeration Type Documentation

## ◆ Dwarf_Form_Class

enum Dwarf_Form_Class

The dwarf specification separates FORMs into different classes. To do the separation properly requires 4 pieces of data as of DWARF4 (thus the function arguments listed here). The DWARF4 specification class definition suffices to describe all DWARF versions. See section 7.5.4, Attribute Encodings. A return of DW_FORM_CLASS_UNKNOWN means the library could not properly figure out what form-class it is.

DW_FORM_CLASS_FRAMEPTR is MIPS/IRIX only, and refers to the DW_AT_MIPS_fde attribute (a reference to the .debug_frame section).

DWARF5: DW_FORM_CLASS_LOCLISTSPTR is like DW_FORM_CLASS_LOCLIST except that LOCLISTSPTR is always a section offset, never an index, and LOCLISTSPTR is only referenced by DW_AT_loclists_base. Note DW_FORM_CLASS_LOCLISTSPTR spelling to distinguish from DW_FORM_CLASS_LOCLISTPTR.

DWARF5: DW_FORM_CLASS_RNGLISTSPTR is like DW_FORM_CLASS_RNGLIST except that RNGLISTSPTR is always a section offset, never an index. DW_FORM_CLASS_RNGLISTSPTR is only referenced by DW_AT_rnglists_base.

## ◆ Dwarf_Ranges_Entry_Type

enum Dwarf_Ranges_Entry_Type

The dwr_addr1/addr2 data is either pair of offsets of a base pc address (DW_RANGES_ENTRY) or a base pc address (dwr_addr2 in DW_RANGES_ADDRESS_SELECTION) or both are zero(end of list, DW_RANGES_END) or both non-zero but identical (means an empty range, DW_RANGES_ENTRY). These are for use with DWARF 2,3,4.

DW_RANGES_ADDRESS_SELECTION should have been spelled DW_RANGES_BASE_ADDRESS. but it is not worth changing as it is widely used.

The DW_RANGES_ENTRY values are raw pc offset data recorded in the section, not addresses.

See also
  Example getting .debug_ranges data

Dwarf_Ranges* apply to DWARF2,3, and 4. Not to DWARF5 (the data is different and in a new DWARF5 section).