Help with non-reproducible .debug_loclists
Nazar Kazakov via Gcc <[email protected]> Tue, 14 Jul 2026 15:27:50 +0100
| Newsgroups | gmane.comp.gcc.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, I'm debugging a non-reproducible build of glslang where gcc sometimes generates different DWARF debug info even though the code is the same. Is there a known bug causing this or is there an easy way to debug this? The non-reproducibility is present in .debug_loclists section, where some entries in some loclists have slightly different start and end value, or different values themselves. Example of different start and end values: 000000000015c06d 000000000015c074 (DW_OP_reg4 (rsi)) 000000000015c074 000000000015c0b3 (DW_OP_entry_value: (DW_OP_reg4 (rsi)); DW_OP_stack_value) vs 000000000015c06d 000000000015c08f (DW_OP_reg4 (rsi)) 000000000015c08f 000000000015c0b3 (DW_OP_entry_value: (DW_OP_reg4 (rsi)); DW_OP_stack_value) Example of different values themselves: 000000000021ea3b 000000000021ea3d (DW_OP_breg0 (rax): -48; DW_OP_stack_value) vs 000000000021ea3b 000000000021ea3d (DW_OP_entry_value: (DW_OP_reg5 (rdi)); DW_OP_stack_value) Full example of the difference can be seen here https://freedesktop-sdk.gitlab.io/-/freedesktop-sdk/-/jobs/15160251956/artifacts/result_folder/components/glslang.bst/index.html. I'm trying to read gcc code to understand how the debug info is generated, but it's not an easy read, so I thought I'd ask in here in case it's a known issue. Thank you, Nazar Kazakov