This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Wrong file name entry in .debug_info section


Hi devs,

gas is putting wrong entry inside .debug_info section into attribute
DW_AT_name
if -xassembler-with-cpp option is used  with deubbing enabled.

considering following example:
hello.s
<https://gist.github.com/kamleshbhalui/ef391b040bcfa514048a2ae680a1eafd>

when below command is issued:
gcc -g -c -xassembler-with-cpp -P hello.s
readelf --debug-dump hello.o | grep DW_AT_name

I get following:

DW_AT_name       :/tmp/cc8P6Tw2.s

which is a temporary file generated by compiler now no more exist.

Why gas is putting wrong file name there.
Even if compiler put *.file="hello.s" * at top of hello.s .
why gas is not using that info?
is this a bug ?since other compiler is giving right answer.

There is one workout that do not use -P so it will generate linemarker and
gas is using file name from there.But I do not want that because that will
be redundant information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]