What

  • Debugging With Arbitrary Record Formats Motivation: coordinate two completely different programs, the compiler and the debugger, so that the program can be debugged.

Result: a compact representation of the relationship between the executable program and the source in a way that is reasonably efficient for a debugger to process.

Debugging Information Entry (DIE)

A DIE has a tag, which specifies what the DIE describes and a list of attributes which fill in details and further describes the entity.

DIEs can be split into two general types. Those that describe data including data types, and those that describe functions and other executable code.

Baes Types

DWARF description of “const char **argv”.

<1>: DW_TAG_variable
DW_AT_name = argv
DW_AT_type = <2>
<2>: DW_TAG_pointer_type
DW_AT_byte_size = 4
DW_AT_type = <3>
<3>: DW_TAG_pointer_type
DW_AT_byte_size = 4
DW_AT_type = <4>
<4>: DW_TAG_const_type
DW_AT_type = <5>
<5>: DW_TAG_base_type
DW_AT_name = char
DW_AT_byte_size = 1
DW_AT_encoding = unsigned