IT lexicon › Programming › DWARF

DWARF

Programming På svenska → Updated: 2026-11-06

The standard debug-information format of the ELF world: what lets a debugger map machine-code addresses back to source lines, variables and types.

The format was developed at Bell Labs for Unix System V in the late 1980s, and the name is a pun on ELF. The data lives in dedicated sections. .debug_info is a tree of entries describing functions, variables and types; .debug_line maps addresses to lines; other sections say where a variable lives right now — in a register, on the stack, or nowhere at all because the optimizer deleted it.

That last part is the heart of why optimized code is hard to debug: the compiler has to track every value through every pass and describe the result. DWARF's description of stack frames, CFI, is also what .eh_frame uses for exceptions. Version 5 shipped in 2017. Windows uses PDB files instead, and Apple puts the data in separate dSYM bundles.

← Back to the lexicon