From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25818 invoked by alias); 7 Oct 2002 17:43:32 -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 25803 invoked from network); 7 Oct 2002 17:43:30 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 7 Oct 2002 17:43:30 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id g97HhTJ20750; Mon, 7 Oct 2002 10:43:29 -0700 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: gdb-patches@sources.redhat.com Cc: Jim Blandy , Elena Zannoni Subject: Re: [rfa] clean up lookup_symbol_aux References: From: David Carlton Date: Mon, 07 Oct 2002 10:43:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-10/txt/msg00173.txt.bz2 On 02 Oct 2002 14:50:34 -0700, David Carlton said: > * I decided to reorder the search order: in the non-HPUXHPPA case, it > makes sense to me to search global psymtabs before searching minimal > symbols. The theory there is that you should look for symbols with > debugging information before looking for symbols without debugging > information; also it seems to me that the current code might, in > some situations, find a static symbol via searching the minsyms > before it finds a global symbol via searching the psymtabs, which is > definitely a bad outcome. Actually, I didn't understand lookup_minimal_symbol well enough when I wrote the above; now I no longer think that the existing code might find a static symbol via minsyms before a global symbol via psymtabs. I still think that it would be a good idea to search psymtabs before searching minimal symbols, but I prefer that only because I think it's slightly cleaner, not because of any correctness reasons. (And I'm not sure which side efficiency concerns land on in this situation; it's kind of complicated. For all I know, it might even be more efficient to move the minimal symbol search before the symtab search!) And, of course, I still think that the general idea of cleaning up lookup_symbol_aux and combining duplicate code is a good one. I'm just more agnostic about what order the resulting patch should call lookup_symbol_aux_symtabs, lookup_symbol_aux_psymtabs, and lookup_symbol_aux_minsyms in. David Carlton carlton@math.stanford.edu