binutils Newspaper
JUNE 15, 2026
binutils/dwarf Proposed

binutils/dwarf: Print embedded source, when available

objdump now prints embedded source code from DWARFv5, enabling easier debugging when source files are unavailable.

This patch enables objdump to extract and display embedded source code stored in DWARFv5 debugging information. This is useful when the original source files are missing or inaccessible during debugging. The patch adds new tests and updates the dwarf.c file to handle the new DWARFv5 line table entry.

In Details

DWARFv5 allows embedding source code directly in the debugging information. This patch modifies objdump to extract and display this embedded source. The relevant DWARF structures are in dwarf2.h, and the logic for parsing and displaying the line table entries is in binutils/dwarf.c.

For Context

DWARF is a debugging data format used to describe the structure and contents of compiled programs, facilitating source-level debugging. DWARFv5 introduced the ability to embed source code directly within the debugging information. This patch enhances the objdump utility to extract and print this embedded source code, which assists in debugging scenarios where the original source files are not readily available.

Filed Under: dwarfdebuggingobjdumpsource code