From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17986 invoked by alias); 22 Aug 2002 12:50:47 -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 17979 invoked from network); 22 Aug 2002 12:50:46 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 209.249.29.67 with SMTP; 22 Aug 2002 12:50:46 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17hrPK-0008DA-00; Thu, 22 Aug 2002 07:49:50 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17hrPy-0007DJ-00; Thu, 22 Aug 2002 08:50:30 -0400 Date: Thu, 22 Aug 2002 05:50:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: don't use minsym name when searching block Message-ID: <20020822125030.GA27560@nevyn.them.org> Mail-Followup-To: Jim Blandy , gdb-patches@sources.redhat.com References: <200208220526.g7M5Qp520822@zenia.red-bean.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200208220526.g7M5Qp520822@zenia.red-bean.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-08/txt/msg00684.txt.bz2 Message-ID: <20020822055000.PsFmNXp2C0kKhrRrWRUyxrN0zpTd_pSleO6fhNrpdTU@z> On Thu, Aug 22, 2002 at 12:26:51AM -0500, Jim Blandy wrote: > > I'd appreciate it if the C++ folks could check this out. I don't have > a test case yet, but I'll try to put one together tomorrow. Could you describe the problem? Also... "the minsym's name might be mangled" definitely seems like a problem; they should either be consistently mangled or demangled... > 2002-08-21 Jim Blandy > > * symtab.c (lookup_symbol_aux): In the case where we find a > minimal symbol of an appropriate name and use its address to > select a symtab to read and search, use `name' (as passed to us) > as the demangled name when searching the symtab's global and > static blocks, not the minsym's name. The minsym's name might be > mangled. Style nit - a comment like this belongs in the code, not in the changelog. > > Index: gdb/symtab.c > =================================================================== > RCS file: /cvs/src/src/gdb/symtab.c,v > retrieving revision 1.68 > diff -c -r1.68 symtab.c > *** gdb/symtab.c 1 Aug 2002 17:18:33 -0000 1.68 > --- gdb/symtab.c 22 Aug 2002 04:38:54 -0000 > *************** > *** 860,874 **** > /* This is a function which has a symtab for its address. */ > bv = BLOCKVECTOR (s); > block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); > ! sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol), > ! mangled_name, namespace); > /* We kept static functions in minimal symbol table as well as > in static scope. We want to find them in the symbol table. */ > if (!sym) > { > block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); > ! sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol), > ! mangled_name, namespace); > } > > /* sym == 0 if symbol was found in the minimal symbol table > --- 860,873 ---- > /* This is a function which has a symtab for its address. */ > bv = BLOCKVECTOR (s); > block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); > ! sym = lookup_block_symbol (block, name, mangled_name, namespace); > /* We kept static functions in minimal symbol table as well as > in static scope. We want to find them in the symbol table. */ > if (!sym) > { > block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); > ! sym = lookup_block_symbol (block, name, > ! mangled_name, namespace); > } > > /* sym == 0 if symbol was found in the minimal symbol table > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer