public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Is this a gcc, gdb or readelf bug?
@ 2004-12-22  1:16 H. J. Lu
  2004-12-22 11:09 ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2004-12-22  1:16 UTC (permalink / raw)
  To: gcc, GDB, binutils

I can't debug gcc 4.0 with gdb:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19124

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?


H.J.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is this a gcc, gdb or readelf bug?
  2004-12-22  1:16 Is this a gcc, gdb or readelf bug? H. J. Lu
@ 2004-12-22 11:09 ` Nick Clifton
  2004-12-22 18:25   ` H. J. Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2004-12-22 11:09 UTC (permalink / raw)
  To: H. J. Lu; +Cc: gcc, GDB, binutils

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.

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.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is this a gcc, gdb or readelf bug?
  2004-12-22 11:09 ` Nick Clifton
@ 2004-12-22 18:25   ` H. J. Lu
  2004-12-23  3:43     ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2004-12-22 18:25 UTC (permalink / raw)
  To: Nick Clifton; +Cc: gcc, GDB, binutils

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is this a gcc, gdb or readelf bug?
  2004-12-22 18:25   ` H. J. Lu
@ 2004-12-23  3:43     ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2004-12-23  3:43 UTC (permalink / raw)
  To: H. J. Lu; +Cc: Nick Clifton, gcc, GDB, binutils

On Wed, Dec 22, 2004 at 10:24:49AM -0800, H. J. Lu wrote:
> > 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.

If you believe there is a GDB bug, please submit a bug report with
self-contained test case.

-- 
Daniel Jacobowitz

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-12-23  3:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-22  1:16 Is this a gcc, gdb or readelf bug? H. J. Lu
2004-12-22 11:09 ` Nick Clifton
2004-12-22 18:25   ` H. J. Lu
2004-12-23  3:43     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).