https://sourceware.org/bugzilla/show_bug.cgi?id=28149
Bug ID: 28149 Summary: debug info with wrong file association Product: binutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: bernd.edlinger at hotmail dot de Target Milestone: --- This was reported as gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101575 but can also be seen as a gas bug, which means, that the test-case defs.adb/defs.ads from a gdb testcase https://sourceware.org/git/?p=binutils-gdb.git;a=tree;f=gdb/testsuite/gdb.ada/formatted_ref (when compiled with -gdwarf-4) has some mixed entries in the line table, that is the source file from the .file <n> directive, but line numbers from the assembler file. That is due to gas/dwarf2dbg.c if (num_of_auto_assigned) { /* Clear slots auto-assigned before the first .file <NUMBER> directive was seen. */ if (files_in_use != (num_of_auto_assigned + 1)) abort (); for (i = 1; i < files_in_use; i++) files[i].filename = NULL; files_in_use = 0; num_of_auto_assigned = 0; } so the previous file(s) are replaced with new files, but the previous line data remain, and reference an unrelated new file from the .file directive. -- You are receiving this mail because: You are on the CC list for the bug.