This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] clean up lookup_symbol_aux
- From: David Carlton <carlton at math dot stanford dot edu>
- To: gdb-patches at sources dot redhat dot com
- Cc: Jim Blandy <jimb at red-bean dot com>, Elena Zannoni <ezannoni at redhat dot com>
- Date: 07 Oct 2002 10:43:28 -0700
- Subject: Re: [rfa] clean up lookup_symbol_aux
- References: <ro1d6qsse6t.fsf@jackfruit.Stanford.EDU>
On 02 Oct 2002 14:50:34 -0700, David Carlton <carlton@math.Stanford.EDU> 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