From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 933 invoked by alias); 7 May 2004 22:04:54 -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 776 invoked from network); 7 May 2004 22:04:52 -0000 Received: from unknown (209.128.65.135) by sourceware.org with QMTP; 7 May 2004 22:04:52 -0000 Received: (qmail 9198 invoked by uid 10); 7 May 2004 22:04:52 -0000 Received: (qmail 24025 invoked by uid 500); 7 May 2004 22:04:44 -0000 Mail-Followup-To: gdb@sources.redhat.com, binutils@sources.redhat.com, cagney@gnu.org From: Ian Lance Taylor To: Andrew Cagney Cc: gdb@sources.redhat.com, binutils@sources.redhat.com Subject: Re: GDB using addr2line? References: <409BDEB7.6070005@gnu.org> Date: Fri, 07 May 2004 22:04:00 -0000 In-Reply-To: <409BDEB7.6070005@gnu.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-05/txt/msg00062.txt.bz2 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