From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3095 invoked by alias); 24 Aug 2002 10:58: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 3088 invoked from network); 24 Aug 2002 10:58:46 -0000 Received: from unknown (HELO rennsau.regent.e-technik.tu-muenchen.de) (129.187.231.63) by sources.redhat.com with SMTP; 24 Aug 2002 10:58:46 -0000 Received: from reaktor.regent.e-technik.tu-muenchen.de (reaktor.regent.e-technik.tu-muenchen.de [129.187.231.170]) by rennsau.regent.e-technik.tu-muenchen.de (8.8.8/8.6.9) with ESMTP id MAA03867 ; Sat, 24 Aug 2002 12:58:45 +0200 (MET DST) From: "Peter.Schauer" Received: (pes@localhost) by reaktor.regent.e-technik.tu-muenchen.de (8.8.8/8.6.9) id MAA32586 ; Sat, 24 Aug 2002 12:58:43 +0200 (MET DST) Message-Id: <200208241058.MAA32586@reaktor.regent.e-technik.tu-muenchen.de> Subject: Re: RFA: don't use minsym name when searching block To: jimb@redhat.com (Jim Blandy) Date: Sat, 24 Aug 2002 05:30:00 -0000 Cc: gdb-patches@sources.redhat.com In-Reply-To: <200208220526.g7M5Qp520822@zenia.red-bean.com>; from "Jim Blandy" at Aug 24, 102 12:13 am X-SW-Source: 2002-08/txt/msg00797.txt.bz2 I proposed a very similar patch almost two years ago, but it got turned down and I was tired of arguing. Please note that there are two more calls to lookup_block_symbol in the #ifdef HPUXHPPA block, which I think have to be adjusted as well. See http://sources.redhat.com/ml/gdb-patches/2000-10/msg00250.html > 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. > > 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. > > 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 > > -- Peter Schauer pes@regent.e-technik.tu-muenchen.de