This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Wrong file name entry in .debug_info section
Hi Kamlesh,
> 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.
this looks very much like PR target/85994
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85994). My solution was
not use use -P.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University