PR28149, debug info with wrong file association

Eric Botcazou botcazou@adacore.com
Fri Sep 17 09:16:38 GMT 2021


> I'm sorry, I see I had a mainline gcc built from older sources..
> Today's build was commit a6aa2458a92f from the top of the gcc-11
> branch.  That one does show the problem.

No, it should generate the same directive:

	.file	"pr28149.c"
	.text
.Ltext0:
	.file 0 "/home/eric/build/gcc/native" "pr28149.c"
#APP
	nop
#NO_APP
	.globl	main
	.type	main, @function
main:
.LFB0:
	.file 1 "pr28149.c"
	.loc 1 3 1
[...]
	.string	"pr28149.c"
	.ident	"GCC: (GNU) 11.2.1 20210903"
	.section	.note.GNU-stack,"",@progbits

and the fix is present in the 11.2 release:

2021-06-24  Eric Botcazou  <ebotcazou@adacore.com>

	* dwarf2out.c (dwarf2out_assembly_start): Emit .file 0 marker here..
	(dwarf2out_finish): ...instead of here.

-- 
Eric Botcazou




More information about the Binutils mailing list