From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7916 invoked by alias); 19 Nov 2003 18:26:35 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7889 invoked from network); 19 Nov 2003 18:26:34 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 19 Nov 2003 18:26:34 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1AMX2A-0000Ok-8x for ; Wed, 19 Nov 2003 13:26:34 -0500 Date: Wed, 19 Nov 2003 18:26:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] find_pc_sect_psymtab(): symbol table not always complete Message-ID: <20031119182634.GA1423@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20031119181910.GD1067@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031119181910.GD1067@gnat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-11/txt/msg00397.txt.bz2 On Wed, Nov 19, 2003 at 10:19:10AM -0800, Joel Brobecker wrote: > Hello, > > Re: http://sources.redhat.com/ml/gdb-patches/2003-11/msg00368.html > > The following change tweaks find_pc_sect_psymtab() to stop assuming > that the symbol table will contain all symbols. So when we don't find > a partial symtab containing a symbol at the same address as the minimal > symbol we found, we return the symtab containing symbol which address > is the closest to the given PC address. > > This fixes the problem reported in the message referenced above. > > As noted by Daniel J, the cleanest fix, in the long run, is probably to > record accurate code ranges rather insted of the textlow/texthigh > addresses. This is a more long term project which I wanted to tackle > without the pressure of the users not being able to debug comfortably. > This will be the subject of another post coming shortly. > > 2003-11-19 J. Brobecker > > * symtab.c (find_pc_sect_psymtab): Refine the search for the > partial symtab corresponding to the given PC address, taking > into account the fact that the symbol table might be incomplete. > > It has been tested on x86-linux with stabs & dwarf-2 with no regression. > It has also been tested on mips-irix but on a 5.3-based version of GDB > (we haven't moved to a more recent version of GDB on this platform yet, > and the HEAD version is giving me some trouble that I need to sort out). > > Comments? OK to apply? FWIW, this looks good to me, but I'd like another comment on the new test to the effect of, the find_pc_sect_psymtab call will always return the closest symbol below pc in tpst. Threw me for a moment how you were just checking for the highest valued symbol. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer