This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB using addr2line?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]