GCC Newspaper
JULY 29, 2026
gcc Proposed

Help with non-reproducible .debug_loclists

Developer seeks help debugging non-reproducible DWARF debug info in .debug_loclists, with varying addresses and values.

Nazar Kazakov is encountering non-reproducible DWARF debug information in the .debug_loclists section when building glslang with GCC. The issue manifests as variations in start/end values or other values within loclists, even when the source code is identical. Nazar is seeking insights into potential bugs or debugging strategies for this DWARF generation problem.

In Details

The user is observing differences in .debug_loclists, a DWARF section detailing location expressions for variables. These differences, affecting start/end addresses and operation values (e.g., DW_OP_reg4, DW_OP_stack_value), suggest a potential issue in DWARF emission, possibly related to optimization, instruction scheduling, or internal compiler state that affects debug information generation reproducibility.

For Context
DWARF
A debugging data format used by many compilers and debuggers. It stores information about source code, such as variable names, types, and memory locations.
.debug_loclists
A section within DWARF debugging information that stores location lists. These lists specify the address ranges where a variable is valid or accessible.
DW_OP_reg4
A DWARF operation code indicating that a value is held in a specific register (register number 4).
DW_OP_stack_value
A DWARF operation code that signifies the value on top of theDWARF expression stack should be considered the actual value of the variable.
Filed Under: debuggingdwarfgcccompilation