From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21409 invoked by alias); 7 May 2004 22:40:15 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21228 invoked from network); 7 May 2004 22:40:14 -0000 Received: from unknown (HELO e34.co.us.ibm.com) (32.97.110.132) by sourceware.org with SMTP; 7 May 2004 22:40:14 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e34.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i47MeDMS383658; Fri, 7 May 2004 18:40:13 -0400 Received: from d03nm113.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i47MeC6a361304; Fri, 7 May 2004 16:40:13 -0600 In-Reply-To: Cc: binutils@sources.redhat.com, gdb@sources.redhat.com MIME-Version: 1.0 Subject: Re: GDB using addr2line? Message-ID: From: Paul Gilliam Date: Fri, 07 May 2004 22:40:00 -0000 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2004-05/txt/msg00063.txt.bz2 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 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