.debug_info.dwo holds a full tree of debugging information entries
(DIEs), so any DWARF tag, attribute and form may appear in it. This page lists them all,
from tables 7.2 to 7.6 of
DWARF Version 5. Codes marked
5 are new in version 5. The codes of expressions, base types,
languages and the line-number program are in the standard’s other tables and are not
repeated here.
Unit types
| Value | Name | Meaning |
|---|---|---|
0x01 | DW_UT_compile | Full compilation unit (not split). |
0x02 | DW_UT_type | Type unit (not split). |
0x03 | DW_UT_partial | Partial compilation unit. |
0x04 | DW_UT_skeleton | Skeleton unit, in the program. |
0x05 | DW_UT_split_compile | Split compilation unit, in the .dwo. |
0x06 | DW_UT_split_type | Split type unit, in the .dwo. |
0x80–0xFF | DW_UT_lo_user–DW_UT_hi_user | Vendor unit types. |
Abbreviations and entries
Each DIE in .debug_info.dwo starts with a ULEB128 abbreviation code
(0 is a null entry, which ends a list of siblings), followed by its attribute values in
the order its abbreviation gives. An abbreviation in .debug_abbrev.dwo
is:
| Field | Encoding | Meaning |
|---|---|---|
| code | ULEB128 | The abbreviation code; 0 ends the unit’s table. |
| tag | ULEB128 | A DW_TAG value. |
| children | 1 byte | 0x00 DW_CHILDREN_no: the next entry is a sibling. 0x01 DW_CHILDREN_yes: the next entry is its first child. |
| attribute specifications | pairs of ULEB128 | An DW_AT name and a DW_FORM; for DW_FORM_implicit_const a SLEB128 value follows, and no value is stored in the DIE. A pair of 0, 0 ends the list. |
With DW_FORM_indirect the value in the DIE starts with a ULEB128 form
code, then the value in that form.
Attributes
The classes say which kinds of form an attribute may use (see classes).
| Value | Name | Classes |
|---|---|---|
0x01 | DW_AT_sibling | reference |
0x02 | DW_AT_location | exprloc, loclist |
0x03 | DW_AT_name | string |
0x04–0x08 | reserved | – |
0x09 | DW_AT_ordering | constant |
0x0a | reserved | – |
0x0b | DW_AT_byte_size | constant, exprloc, reference |
0x0c | reserved (was DW_AT_bit_offset in DWARF 3 and earlier) | constant, exprloc, reference |
0x0d | DW_AT_bit_size | constant, exprloc, reference |
0x0e, 0x0f | reserved | – |
0x10 | DW_AT_stmt_list | lineptr |
0x11 | DW_AT_low_pc | address |
0x12 | DW_AT_high_pc | address, constant |
0x13 | DW_AT_language | constant |
0x14 | reserved | – |
0x15 | DW_AT_discr | reference |
0x16 | DW_AT_discr_value | constant |
0x17 | DW_AT_visibility | constant |
0x18 | DW_AT_import | reference |
0x19 | DW_AT_string_length | exprloc, loclist, reference |
0x1a | DW_AT_common_reference | reference |
0x1b | DW_AT_comp_dir | string |
0x1c | DW_AT_const_value | block, constant, string |
0x1d | DW_AT_containing_type | reference |
0x1e | DW_AT_default_value | constant, reference, flag |
0x1f | reserved | – |
0x20 | DW_AT_inline | constant |
0x21 | DW_AT_is_optional | flag |
0x22 | DW_AT_lower_bound | constant, exprloc, reference |
0x23, 0x24 | reserved | – |
0x25 | DW_AT_producer | string |
0x26 | reserved | – |
0x27 | DW_AT_prototyped | flag |
0x28, 0x29 | reserved | – |
0x2a | DW_AT_return_addr | exprloc, loclist |
0x2b | reserved | – |
0x2c | DW_AT_start_scope | constant, rnglist |
0x2d | reserved | – |
0x2e | DW_AT_bit_stride | constant, exprloc, reference |
0x2f | DW_AT_upper_bound | constant, exprloc, reference |
0x30 | reserved | – |
0x31 | DW_AT_abstract_origin | reference |
0x32 | DW_AT_accessibility | constant |
0x33 | DW_AT_address_class | constant |
0x34 | DW_AT_artificial | flag |
0x35 | DW_AT_base_types | reference |
0x36 | DW_AT_calling_convention | constant |
0x37 | DW_AT_count | constant, exprloc, reference |
0x38 | DW_AT_data_member_location | constant, exprloc, loclist |
0x39 | DW_AT_decl_column | constant |
0x3a | DW_AT_decl_file | constant |
0x3b | DW_AT_decl_line | constant |
0x3c | DW_AT_declaration | flag |
0x3d | DW_AT_discr_list | block |
0x3e | DW_AT_encoding | constant |
0x3f | DW_AT_external | flag |
0x40 | DW_AT_frame_base | exprloc, loclist |
0x41 | DW_AT_friend | reference |
0x42 | DW_AT_identifier_case | constant |
0x43 | reserved (was DW_AT_macro_info in DWARF 4 and earlier) | macptr |
0x44 | DW_AT_namelist_item | reference |
0x45 | DW_AT_priority | reference |
0x46 | DW_AT_segment | exprloc, loclist |
0x47 | DW_AT_specification | reference |
0x48 | DW_AT_static_link | exprloc, loclist |
0x49 | DW_AT_type | reference |
0x4a | DW_AT_use_location | exprloc, loclist |
0x4b | DW_AT_variable_parameter | flag |
0x4c | DW_AT_virtuality | constant |
0x4d | DW_AT_vtable_elem_location | exprloc, loclist |
0x4e | DW_AT_allocated | constant, exprloc, reference |
0x4f | DW_AT_associated | constant, exprloc, reference |
0x50 | DW_AT_data_location | exprloc |
0x51 | DW_AT_byte_stride | constant, exprloc, reference |
0x52 | DW_AT_entry_pc | address, constant |
0x53 | DW_AT_use_UTF8 | flag |
0x54 | DW_AT_extension | reference |
0x55 | DW_AT_ranges | rnglist |
0x56 | DW_AT_trampoline | address, flag, reference, string |
0x57 | DW_AT_call_column | constant |
0x58 | DW_AT_call_file | constant |
0x59 | DW_AT_call_line | constant |
0x5a | DW_AT_description | string |
0x5b | DW_AT_binary_scale | constant |
0x5c | DW_AT_decimal_scale | constant |
0x5d | DW_AT_small | reference |
0x5e | DW_AT_decimal_sign | constant |
0x5f | DW_AT_digit_count | constant |
0x60 | DW_AT_picture_string | string |
0x61 | DW_AT_mutable | flag |
0x62 | DW_AT_threads_scaled | flag |
0x63 | DW_AT_explicit | flag |
0x64 | DW_AT_object_pointer | reference |
0x65 | DW_AT_endianity | constant |
0x66 | DW_AT_elemental | flag |
0x67 | DW_AT_pure | flag |
0x68 | DW_AT_recursive | flag |
0x69 | DW_AT_signature | reference |
0x6a | DW_AT_main_subprogram | flag |
0x6b | DW_AT_data_bit_offset | constant |
0x6c | DW_AT_const_expr | flag |
0x6d | DW_AT_enum_class | flag |
0x6e | DW_AT_linkage_name | string |
0x6f | DW_AT_string_length_bit_size 5 | constant |
0x70 | DW_AT_string_length_byte_size 5 | constant |
0x71 | DW_AT_rank 5 | constant, exprloc |
0x72 | DW_AT_str_offsets_base 5 | stroffsetsptr |
0x73 | DW_AT_addr_base 5 | addrptr |
0x74 | DW_AT_rnglists_base 5 | rnglistsptr |
0x75 | reserved (unused) | – |
0x76 | DW_AT_dwo_name 5 | string |
0x77 | DW_AT_reference 5 | flag |
0x78 | DW_AT_rvalue_reference 5 | flag |
0x79 | DW_AT_macros 5 | macptr |
0x7a | DW_AT_call_all_calls 5 | flag |
0x7b | DW_AT_call_all_source_calls 5 | flag |
0x7c | DW_AT_call_all_tail_calls 5 | flag |
0x7d | DW_AT_call_return_pc 5 | address |
0x7e | DW_AT_call_value 5 | exprloc |
0x7f | DW_AT_call_origin 5 | exprloc |
0x80 | DW_AT_call_parameter 5 | reference |
0x81 | DW_AT_call_pc 5 | address |
0x82 | DW_AT_call_tail_call 5 | flag |
0x83 | DW_AT_call_target 5 | exprloc |
0x84 | DW_AT_call_target_clobbered 5 | exprloc |
0x85 | DW_AT_call_data_location 5 | exprloc |
0x86 | DW_AT_call_data_value 5 | exprloc |
0x87 | DW_AT_noreturn 5 | flag |
0x88 | DW_AT_alignment 5 | constant |
0x89 | DW_AT_export_symbols 5 | flag |
0x8a | DW_AT_deleted 5 | flag |
0x8b | DW_AT_defaulted 5 | constant |
0x8c | DW_AT_loclists_base 5 | loclistsptr |
0x2000–0x3fff | DW_AT_lo_user–DW_AT_hi_user (vendor attributes, e.g. the GNU split-DWARF ones at 0x2130–0x2135) | – |
Forms
“Offset size” is 4 bytes in the 32-bit DWARF format and 8 in the 64-bit format.
| Value | Name | Class | Encoding in the DIE |
|---|---|---|---|
0x01 | DW_FORM_addr | address | An address of address_size bytes, relocated by the linker. |
0x02 | reserved | – | – |
0x03 | DW_FORM_block2 | block | 2-byte length, then that many bytes. |
0x04 | DW_FORM_block4 | block | 4-byte length, then that many bytes. |
0x05 | DW_FORM_data2 | constant | 2 bytes. |
0x06 | DW_FORM_data4 | constant | 4 bytes. |
0x07 | DW_FORM_data8 | constant | 8 bytes. |
0x08 | DW_FORM_string | string | The string itself, ending in a 0 byte. |
0x09 | DW_FORM_block | block | ULEB128 length, then that many bytes. |
0x0a | DW_FORM_block1 | block | 1-byte length, then that many bytes. |
0x0b | DW_FORM_data1 | constant | 1 byte. |
0x0c | DW_FORM_flag | flag | 1 byte: 0 false, other values true. |
0x0d | DW_FORM_sdata | constant | SLEB128. |
0x0e | DW_FORM_strp | string | Offset-size offset into .debug_str. |
0x0f | DW_FORM_udata | constant | ULEB128. |
0x10 | DW_FORM_ref_addr | reference | Offset-size offset from the start of .debug_info. |
0x11 | DW_FORM_ref1 | reference | 1-byte offset from the start of the unit header. |
0x12 | DW_FORM_ref2 | reference | 2-byte unit offset. |
0x13 | DW_FORM_ref4 | reference | 4-byte unit offset. |
0x14 | DW_FORM_ref8 | reference | 8-byte unit offset. |
0x15 | DW_FORM_ref_udata | reference | ULEB128 unit offset. |
0x16 | DW_FORM_indirect | (any) | ULEB128 form code, then a value in that form. |
0x17 | DW_FORM_sec_offset | addrptr, lineptr, loclist, loclistsptr, macptr, rnglist, rnglistsptr, stroffsetsptr | Offset-size offset into the section the attribute’s class names. |
0x18 | DW_FORM_exprloc | exprloc | ULEB128 length, then a DWARF expression. |
0x19 | DW_FORM_flag_present | flag | Nothing: the attribute is present and true. |
0x1a | DW_FORM_strx 5 | string | ULEB128 index into the string offsets table. |
0x1b | DW_FORM_addrx 5 | address | ULEB128 index into .debug_addr. |
0x1c | DW_FORM_ref_sup4 5 | reference | 4-byte offset into a supplementary file’s .debug_info. |
0x1d | DW_FORM_strp_sup 5 | string | Offset-size offset into a supplementary file’s .debug_str. |
0x1e | DW_FORM_data16 5 | constant | 16 bytes. |
0x1f | DW_FORM_line_strp 5 | string | Offset-size offset into .debug_line_str. |
0x20 | DW_FORM_ref_sig8 | reference | 8-byte type signature of a type unit. |
0x21 | DW_FORM_implicit_const 5 | constant | Nothing: the value is the SLEB128 stored in the abbreviation. |
0x22 | DW_FORM_loclistx 5 | loclist | ULEB128 index into the location list offsets. |
0x23 | DW_FORM_rnglistx 5 | rnglist | ULEB128 index into the range list offsets. |
0x24 | DW_FORM_ref_sup8 5 | reference | 8-byte offset into a supplementary file’s .debug_info. |
0x25 | DW_FORM_strx1 5 | string | 1-byte string index. |
0x26 | DW_FORM_strx2 5 | string | 2-byte string index. |
0x27 | DW_FORM_strx3 5 | string | 3-byte string index. |
0x28 | DW_FORM_strx4 5 | string | 4-byte string index. |
0x29 | DW_FORM_addrx1 5 | address | 1-byte address index. |
0x2a | DW_FORM_addrx2 5 | address | 2-byte address index. |
0x2b | DW_FORM_addrx3 5 | address | 3-byte address index. |
0x2c | DW_FORM_addrx4 5 | address | 4-byte address index. |
A .dwo is never relocated, so its producers avoid forms that would need
relocation: strings use the strx forms rather than
DW_FORM_strp, addresses the addrx forms, and references stay
inside the unit or name a type unit with DW_FORM_ref_sig8.
Classes
| Class | Forms | Meaning |
|---|---|---|
| address | addr, addrx, addrx1–addrx4 | A machine address, direct or by index. |
| addrptr | sec_offset | Offset into .debug_addr. |
| block | block1, block2, block4, block | Uninterpreted bytes. |
| constant | data1, data2, data4, data8, data16, sdata, udata, implicit_const | A number or other fixed data, in target byte order. |
| exprloc | exprloc | A DWARF expression or location description. |
| flag | flag, flag_present | True or false. |
| lineptr | sec_offset | Offset into .debug_line or .debug_line.dwo. |
| loclist | loclistx, sec_offset | A location list. |
| loclistsptr | sec_offset | Offset into .debug_loclists. |
| macptr | sec_offset | Offset into .debug_macro or .debug_macro.dwo. |
| reference | ref1, ref2, ref4, ref8, ref_udata, ref_addr, ref_sig8, ref_sup4, ref_sup8 | Another DIE. |
| rnglist | rnglistx, sec_offset | A range list. |
| rnglistsptr | sec_offset | Offset into .debug_rnglists. |
| string | string, strp, line_strp, strp_sup, strx, strx1–strx4 | A string, inline or by offset or index. |
| stroffsetsptr | sec_offset | Offset into .debug_str_offsets. |
Sources
DWARF Debugging Information Format,
Version 5: section 7.5.1 and table 7.2 (unit types), 7.5.2 and 7.5.3 (entries and
abbreviations), table 7.3 (tags), table 7.4 (children), table 7.5 (attributes and
classes), 7.5.5 and table 7.6 (classes and forms). The note on GNU vendor attributes
is from LLVM’s BinaryFormat/Dwarf.def.