This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Wrong file name entry in .debug_info section
- From: kamlesh kumar <kamleshbhalui at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 2 Aug 2018 18:13:43 +0530
- Subject: 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.