public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* addr2line with stabs again
@ 2005-05-19 16:37 Jeff Baker
  2005-07-05 12:15 ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Baker @ 2005-05-19 16:37 UTC (permalink / raw)
  To: 'binutils@sourceware.org'

[-- Attachment #1: Type: text/plain, Size: 836 bytes --]

I posted about this a while ago but we're running into it again.  Apparently
it appeared to work with GCC 3.3.5 because we use dwarf-2 as the default
instead of stabs.

With stabs debugging addr2line seems to walk backward in the code as far as
it has to in order to find line number information.  The net effect is that
if you ask for the line number of an address inside a function that was
linked in from a static lib that didn't have debug info you will get the
source file and line number of whatever the last debug info is before that
address.  With dwarf-2 you get '??:0'.

As a first step we only need to know if this is expected from stabs or if
this is a bug.

I have confirmed this behaviour with the 2.16 binutils on Fedora Core 2 with
GCC 3.3.3 as well as on Neutrino with GCC 3.3.5.  I have attached a test
case as well.


[-- Attachment #2: stabs_testcase.tgz --]
[-- Type: application/octet-stream, Size: 718 bytes --]

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

* Re: addr2line with stabs again
  2005-05-19 16:37 addr2line with stabs again Jeff Baker
@ 2005-07-05 12:15 ` Nick Clifton
  2005-07-05 17:05   ` H. J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2005-07-05 12:15 UTC (permalink / raw)
  To: Jeff Baker; +Cc: 'binutils@sourceware.org'

Hi Jeff,

> With stabs debugging addr2line seems to walk backward in the code as far as
> it has to in order to find line number information.  The net effect is that
> if you ask for the line number of an address inside a function that was
> linked in from a static lib that didn't have debug info you will get the
> source file and line number of whatever the last debug info is before that
> address.  With dwarf-2 you get '??:0'.
> 
> As a first step we only need to know if this is expected from stabs or if
> this is a bug.

Oh it is a bug alright.  It may well have been fixed though as Fred FIsh 
has
been doing some work in this area.  Please could you try downloading the
latest binutils sources and trying them.  If that does not fix the
problem then please could you file a bug report ?

Cheers
   Nick

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

* Re: addr2line with stabs again
  2005-07-05 12:15 ` Nick Clifton
@ 2005-07-05 17:05   ` H. J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H. J. Lu @ 2005-07-05 17:05 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Jeff Baker, 'binutils@sourceware.org'

On Tue, Jul 05, 2005 at 01:18:59PM +0100, Nick Clifton wrote:
> Hi Jeff,
> 
> >With stabs debugging addr2line seems to walk backward in the code as far as
> >it has to in order to find line number information.  The net effect is that
> >if you ask for the line number of an address inside a function that was
> >linked in from a static lib that didn't have debug info you will get the
> >source file and line number of whatever the last debug info is before that
> >address.  With dwarf-2 you get '??:0'.
> >
> >As a first step we only need to know if this is expected from stabs or if
> >this is a bug.
> 
> Oh it is a bug alright.  It may well have been fixed though as Fred FIsh 
> has
> been doing some work in this area.  Please could you try downloading the
> latest binutils sources and trying them.  If that does not fix the
> problem then please could you file a bug report ?
> 

FYI, the Linux binutils also includes

http://sourceware.org/ml/binutils/2005-06/msg00099.html



H.J.

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

end of thread, other threads:[~2005-07-05 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-19 16:37 addr2line with stabs again Jeff Baker
2005-07-05 12:15 ` Nick Clifton
2005-07-05 17:05   ` H. J. Lu

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