This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] add linkage_name argument to lookup_partial_symbol


On 03 Mar 2003 11:50:54 -0800, David Carlton <carlton at math dot Stanford dot EDU> said:

> Currently, lookup_partial_symbol only matches on natural names, not on
> linkage names.  This can be a problem when it's called from
> lookup_symbol_aux_psymtabs: that functions cares about the linkage
> name of the symbol in addition to its natural name.  So the wrong
> partial symtab could be found, leading to a "name found in psymtab but
> not in symtab" error.

I should also add another observation: after this patch goes in, every
use of SYMBOL_MATCHES_NATURAL_NAME in symtab.c will be paired with a
check on linkage names.  This suggests that perhaps we should replace
SYMBOL_MATCHES_NATURAL_NAME by a macro SYMBOL_MATCHES_NAMES that
accepts a symbol, a linkage name (which might be NULL), and a natural
name.

On the other hand, we still have the uses of
DEPRECATED_SYMBOL_MATCHES_NAME in minsyms.c, and there such a
SYMBOL_MATCHES_NAMES wouldn't be appropriate (though the current
SYMBOL_MATCHES_NATURAL_NAME might be).  So it's not something to do
right now, but it probably is something to keep in mind once minsyms.c
has gotten cleaned up a bit, when we'll have a better idea where this
macro might be used.  (We should probably audit all uses of strcmp_iw
within GDB when doing this.)

David Carlton
carlton at math dot stanford dot edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]