https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108600
Bug ID: 108600 Summary: Use DW_LNS_set_prologue_end Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- The prologue_end marker (introduced in dwarf v3) is currently not emitted by gcc. This is the case for -gno-as-loc-support (gcc emitting .debug_line contribution). And for -gas-loc-support (gcc emitting .loc directives). Note that there is an existing convention that marks the end of the prologue: the second entry in the line table marks the first insn after the prologue. However, that convention is not known by everyone, which makes it easier to break it without noticing. Note that for for instance gdb test-case gdb.ada/ref_param.exp, this convention was broken for gcc 7.5.0 (and I don't know how much earlier), and my current guess is that it got fixed in gcc 11.1.0, by commit c029fcb5680 ("Reset force_source_line in final.c"). The only way to make the end of the prologue visible in assembly as well as disassembly is to make it explicit by using DW_LNS_set_prologue_end.