This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Is this a gcc, gdb or readelf bug?
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, GDB <gdb at sources dot redhat dot com>,binutils at sources dot redhat dot com
- Date: Wed, 22 Dec 2004 10:24:49 -0800
- Subject: Re: Is this a gcc, gdb or readelf bug?
- References: <20041222011627.GA15293@lucon.org> <41C9577D.3010509@redhat.com>
On Wed, Dec 22, 2004 at 11:16:13AM +0000, Nick Clifton wrote:
> Hi H. J.
>
> >I can't debug gcc 4.0 with gdb:
> >
> >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19124
>
> Note - I have just committed a patch to readelf to make its output
> slightly more helpful when it encounters problems like this.
I believe there is a readelf bug:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=615
>
> The 19124 bug is definitely a GCC problem - readelf is just reporting
> the facts, and as Andrew Pinkski has reported if you compile with
> -fno-var-tracking the problem goes away.
>
> >When I used idb, I got
> >
> >(idb) stop in tls_symbolic_operand
> >
> >Info: Optimized variables show as <no value> when no location is
> >allocated.
> >[#1: stop in int tls_symbolic_operand(rtx, enum machine_mode)]
> >(idb) r
> >
> >Is that a gdb/readelf or gcc bug?
>
> GDB not being able to debug GCC is a GDB problem. (Or possibly a
> problem of the compiler than was used to compile the GCC being
> debugged). Either way I am pretty sure that readelf is blameless in
> this situation.
I think gcc may be correct and gdb just can't handle location list
correctly.
H.J.