10.5. DWARF Extensions

The LSB does not specify debugging information, however, some additional sections contain information which is encoded using the the encoding as specified by DWARF Debugging Information Format, Version 4 with extensions defined here.

10.5.1. DWARF Exception Header Encoding

The DWARF Exception Header Encoding is used to describe the type of data used in the .eh_frame and .eh_frame_hdr section. The upper 4 bits indicate how the value is to be applied. The lower 4 bits indicate the format of the data.

Table 10-5. DWARF Exception Header value format

NameValueMeaning
DW_EH_PE_absptr0x00The Value is a literal pointer whose size is determined by the architecture.
DW_EH_PE_uleb1280x01Unsigned value is encoded using the Little Endian Base 128 (LEB128) as defined by DWARF Debugging Information Format, Version 4.
DW_EH_PE_udata20x02A 2 bytes unsigned value.
DW_EH_PE_udata40x03A 4 bytes unsigned value.
DW_EH_PE_udata80x04An 8 bytes unsigned value.
DW_EH_PE_sleb1280x09Signed value is encoded using the Little Endian Base 128 (LEB128) as defined by DWARF Debugging Information Format, Version 4.
DW_EH_PE_sdata20x0AA 2 bytes signed value.
DW_EH_PE_sdata40x0BA 4 bytes signed value.
DW_EH_PE_sdata80x0CAn 8 bytes signed value.

Table 10-6. DWARF Exception Header application

NameValueMeaning
DW_EH_PE_pcrel0x10Value is relative to the current program counter.
DW_EH_PE_textrel0x20Value is relative to the beginning of the .text section.
DW_EH_PE_datarel0x30Value is relative to the beginning of the .got or .eh_frame_hdr section.
DW_EH_PE_funcrel0x40Value is relative to the beginning of the function.
DW_EH_PE_aligned0x50Value is aligned to an address unit sized boundary.

One special encoding, 0xff (DW_EH_PE_omit), shall be used to indicate that no value ispresent.

10.5.2. DWARF CFI Extensions

In addition to the Call Frame Instructions defined in section 6.4.2 of DWARF Debugging Information Format, Version 4, the following additional Call Frame Instructions may also be used.

Table 10-7. Additional DWARF Call Frame Instructions

NameValueMeaning
DW_CFA_GNU_args_size0x2eThe DW_CFA_GNU_args_size instruction takes an unsigned LEB128 operand representing an argument size. This instruction specifies the total of the size of the arguments which have been pushed onto the stack.
DW_CFA_GNU_negative_offset_extended0x2fThe DW_CFA_def_cfa_sf instruction takes two operands: an unsigned LEB128 value representing a register number and an unsigned LEB128 which represents the magnitude of the offset. This instruction is identical to DW_CFA_offset_extended_sf except that the operand is subtracted to produce the offset. This instructions is obsoleted by DW_CFA_offset_extended_sf.