* GDB using addr2line?
@ 2004-05-07 20:55 Andrew Cagney
2004-05-07 20:57 ` Daniel Jacobowitz
2004-05-07 22:04 ` Ian Lance Taylor
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Cagney @ 2004-05-07 20:55 UTC (permalink / raw)
To: gdb, binutils
Hello,
As anyone looked at (interested in) getting GDB and addr2line sharing
common linetable code? A libsal (source and line) say.
GDB, for N:M breakpoints, needs a better line table, if addr2line is
going to keep working its going to need something similar.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB using addr2line?
2004-05-07 20:55 GDB using addr2line? Andrew Cagney
@ 2004-05-07 20:57 ` Daniel Jacobowitz
2004-05-07 22:04 ` Ian Lance Taylor
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2004-05-07 20:57 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb, binutils
On Fri, May 07, 2004 at 03:08:39PM -0400, Andrew Cagney wrote:
> Hello,
>
> As anyone looked at (interested in) getting GDB and addr2line sharing
> common linetable code? A libsal (source and line) say.
>
> GDB, for N:M breakpoints, needs a better line table, if addr2line is
> going to keep working its going to need something similar.
addr2line has an adequate address to line (duh) mapping. It's in BFD,
unsurprisingly. It doesn't maintain any data structures worth speaking
about for going the other way, which is what GDB will need; and I don't
think other BFD clients are going to need that either.
--
Daniel Jacobowitz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB using addr2line?
2004-05-07 20:55 GDB using addr2line? Andrew Cagney
2004-05-07 20:57 ` Daniel Jacobowitz
@ 2004-05-07 22:04 ` Ian Lance Taylor
2004-05-07 22:40 ` Paul Gilliam
1 sibling, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 2004-05-07 22:04 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb, binutils
Andrew Cagney <cagney@gnu.org> writes:
> As anyone looked at (interested in) getting GDB and addr2line sharing
> common linetable code? A libsal (source and line) say.
BFD has long had bfd_find_nearest_line(). It was originally used by
the linker to report error messages using the source code line--at the
time, a great innovation. Ulrich Lauther built addr2line as a wrapper
around bfd_find_nearest_line(). If you look at addr2line.c, you will
see that it is very simple. gdb needs a much more serious approach to
mapping between addresses and source code lines.
That said, it would be perfectly reasonable for gdb and addr2line to
share code, just as it would be perfectly reasonable for gdb and
objdump/objcopy --debugging to share code. I don't think anybody has
looked at either possibility.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB using addr2line?
2004-05-07 22:04 ` Ian Lance Taylor
@ 2004-05-07 22:40 ` Paul Gilliam
0 siblings, 0 replies; 4+ messages in thread
From: Paul Gilliam @ 2004-05-07 22:40 UTC (permalink / raw)
Cc: binutils, gdb
And don't forget ltrace and the like... they look a lot like a
special-purpose debugger on the inside.
gdb-owner@sources.redhat.com wrote on 05/07/2004 03:04:44 PM:
> Andrew Cagney <cagney@gnu.org> writes:
>
> > As anyone looked at (interested in) getting GDB and addr2line sharing
> > common linetable code? A libsal (source and line) say.
>
> BFD has long had bfd_find_nearest_line(). It was originally used by
> the linker to report error messages using the source code line--at the
> time, a great innovation. Ulrich Lauther built addr2line as a wrapper
> around bfd_find_nearest_line(). If you look at addr2line.c, you will
> see that it is very simple. gdb needs a much more serious approach to
> mapping between addresses and source code lines.
>
> That said, it would be perfectly reasonable for gdb and addr2line to
> share code, just as it would be perfectly reasonable for gdb and
> objdump/objcopy --debugging to share code. I don't think anybody has
> looked at either possibility.
>
> Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-05-07 22:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-07 20:55 GDB using addr2line? Andrew Cagney
2004-05-07 20:57 ` Daniel Jacobowitz
2004-05-07 22:04 ` Ian Lance Taylor
2004-05-07 22:40 ` Paul Gilliam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox