Wrong file name entry in .debug_info section

2018-08-02 Thread kamlesh kumar
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


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.


Re: Wrong file name entry in .debug_info section

2018-08-02 Thread Rainer Orth
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
> 
>
> 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


Re: Wrong file name entry in .debug_info section

2018-08-02 Thread kamlesh kumar
Hi Rainer,

temporarly removing compiler option -P do solve the problem Here.
But ,do you think this is the permanent solution of this bug?

If you see here hello.s
 ,
compiler puts* .file "hello.s".*
why this info is  not being used.

If we make compiler use this info than problem will be solved i think.

~Kamlesh Kumar

On Thu, Aug 2, 2018 at 6:18 PM Rainer Orth 
wrote:

> 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
> > 
> >
> > 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
>


gcc-7-20180802 is now available

2018-08-02 Thread gccadmin
Snapshot gcc-7-20180802 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/7-20180802/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 7 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-7-branch 
revision 263279

You'll find:

 gcc-7-20180802.tar.xzComplete GCC

  SHA256=c196e8b174ef11b14b5d70f9c36f8d52f3c930048ff3087ae41dcefe0f1c85d0
  SHA1=5c2a01c378bfa049bf26560d64cd1dab573937d9

Diffs from 7-20180726 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-7
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.