wire / wire-format / dwarf-debug
DWARF is the standard debug information format for ELF (and other) binaries. It provides source-level debugging: line number tables (mapping PC to source line), variable locations (register/stack), type information, and call frame information (CFI) for unwinding. DWARF uses sections: .debug_info (DIEs - Debugging Information Entries), .debug_line (line number program), .debug_str (string table), .debug_abbrev (abbreviation table), .debug_frame/.eh_frame (call frame info).
aka: DWARF debug information format
spec: DWARF 5 specification
DWARF is the standard debug information format for ELF (and other) binaries. It provides source-level debugging: line number tables (mapping PC to source line), variable locations (register/stack), type information, and call frame information (CFI) for unwinding. DWARF uses sections: .debug_info (DIEs - Debugging Information Entries), .debug_line (line number program), .debug_str (string table), .debug_abbrev (abbreviation table), .debug_frame/.eh_frame (call frame info).
| field | size | meaning |
|---|---|---|
| .debug_info | variable | DIEs (Debugging Information Entries): tree of tagged entries describing types, variables, functions, scopes. |
| DIE tag | ULEB128 | Tag: DW_TAG_compile_unit, DW_TAG_subprogram, DW_TAG_variable, DW_TAG_base_type, DW_TAG_pointer_type, etc. |
| DIE attributes | variable | Attributes: DW_AT_name, DW_AT_type, DW_AT_location, DW_AT_low_pc, DW_AT_high_pc, DW_AT_decl_file, DW_AT_decl_line, etc. |
| .debug_line | variable | Line number program: state machine mapping addresses to source lines (file, line, column). |
| .debug_abbrev | variable | Abbreviation table: templates for DIEs (which attributes each tag has). |
| .eh_frame | variable | Call Frame Information (CFI): unwind rules for each function (how to restore registers and SP). |
| LEB128 | variable | Little-Endian Base 128: variable-length integer encoding (7 bits per byte, MSB = continue). |
| Location expressions | variable | DW_OP_reg0 (register), DW_OP_fbreg (frame base + offset), DW_OP_addr (absolute address), DW_OP_deref (dereference). |
example:
00 00 00 00
DWARF (placeholder)
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/dwarf-debug
or /wire-format/dwarf-debug.json