From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13398 invoked by alias); 20 Feb 2003 20:43:19 -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 13361 invoked from network); 20 Feb 2003 20:43:17 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 20 Feb 2003 20:43:17 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h1KKhHN23649 for ; Thu, 20 Feb 2003 15:43:17 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1KKhHf15192 for ; Thu, 20 Feb 2003 15:43:17 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1KKhGt26097; Thu, 20 Feb 2003 15:43:16 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 0EC29FF79; Thu, 20 Feb 2003 15:47:20 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15957.16088.234106.47580@localhost.redhat.com> Date: Thu, 20 Feb 2003 20:43:00 -0000 To: David Carlton Cc: gdb-patches@sources.redhat.com, Elena Zannoni Subject: Re: [rfa] revert my previous search_symbols change, add comment In-Reply-To: References: X-SW-Source: 2003-02/txt/msg00494.txt.bz2 David Carlton writes: > In my patch from 2002-12-23, I changed some code in search_symbols > from a call to lookup_symbol to a call to lookup_symbol_aux_minsyms. > At that time, I didn't understand exactly what > lookup_symbol_aux_minsyms did; now that I understand that function > better, I don't think that change was a good idea. > > So this patch reverts that change. At Andrew's suggestion, I've added > a comment as well, saying what I'd really like to replace the call to > lookup_symbol with. OK > > In my next patch, I'll change lookup_symbol_aux_minsyms to actually do > something correct (now that Daniel has been kind enough to demangle > partial symbols for me), but I wanted to get this part of the change > out of the way first. > Question, where does the other patch I just replied to stand wrt to this? Should we forget about the old patch? elena > Tested on i686-pc-linux-gnu/GCC3.1/DWARF-2; OK to apply? > > David Carlton > carlton@math.stanford.edu > > 2003-02-04 David Carlton > > * symtab.c (search_symbols): Revert the search_symbols part of my > 2002-12-23 patch. Add comment. > > Index: symtab.c > =================================================================== > RCS file: /cvs/src/src/gdb/symtab.c,v > retrieving revision 1.87 > diff -u -p -r1.87 symtab.c > --- symtab.c 4 Feb 2003 18:07:01 -0000 1.87 > +++ symtab.c 4 Feb 2003 23:55:02 -0000 > @@ -2967,31 +2967,18 @@ search_symbols (char *regexp, namespace_ > { > if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol))) > { > - if (kind == FUNCTIONS_NAMESPACE) > - { > - found_misc = 1; > - } > - else > - { > - struct symbol *sym; > - > - if (SYMBOL_DEMANGLED_NAME (msymbol) != NULL) > - sym > - = lookup_symbol_aux_minsyms (SYMBOL_DEMANGLED_NAME > - (msymbol), > - SYMBOL_NAME (msymbol), > - VAR_NAMESPACE, > - NULL, NULL); > - else > - sym > - = lookup_symbol_aux_minsyms (SYMBOL_NAME (msymbol), > - NULL, > - VAR_NAMESPACE, > - NULL, NULL); > - > - if (sym == NULL) > - found_misc = 1; > - } > + /* FIXME: carlton/2003-02-04: Given that the > + semantics of lookup_symbol keeps on changing > + slightly, it would be a nice idea if we had a > + function lookup_symbol_minsym that found the > + symbol associated to a given minimal symbol (if > + any). */ > + if (kind == FUNCTIONS_NAMESPACE > + || lookup_symbol (SYMBOL_NAME (msymbol), > + (struct block *) NULL, > + VAR_NAMESPACE, > + 0, (struct symtab **) NULL) == NULL) > + found_misc = 1; > } > } > }