This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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,

gcc is putting wrong enrty inside .debug_info section into attribute
DW_AT_name if -xassembler-with-cpp  option is used with debugging enabled.

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

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

I get following:
DW_AT_name        : /tmp/cc8P6Sk1.s
which is temporary file generated by compiler.

I think it should point to original source file as other compiler do.

is it a compiler bug?or there is a way out.


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