forked from Imagelibrary/binutils-gdb
2000-10-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
From Daniel Berlin <dberlin@redhat.com> : * symtab.c (lookup_symbol_aux): New function. Renamed from lookup_symbol. Move code to do demangling/case sensitivity to lookup_symbol(). (lookup_symbol): Now wrapper for lookup_symbol_aux, so we can perform case sensitivity/demangling without leaking memory. Move code to do demangling/case sensitivity from old_lookup_symbol to here. (lookup_partial_symbol): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME. (lookup_block_symbol): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME. Don't do linear search in case of C++. * symfile.c (compare_symbols): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME. (compare_psymbols): Same here.
This commit is contained in:
@@ -212,8 +212,7 @@ compare_symbols (const PTR s1p, const PTR s2p)
|
||||
|
||||
s1 = (struct symbol **) s1p;
|
||||
s2 = (struct symbol **) s2p;
|
||||
|
||||
return (STRCMP (SYMBOL_NAME (*s1), SYMBOL_NAME (*s2)));
|
||||
return (STRCMP (SYMBOL_SOURCE_NAME (*s1), SYMBOL_SOURCE_NAME (*s2)));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -241,8 +240,14 @@ compare_symbols (const PTR s1p, const PTR s2p)
|
||||
static int
|
||||
compare_psymbols (const PTR s1p, const PTR s2p)
|
||||
{
|
||||
register char *st1 = SYMBOL_NAME (*(struct partial_symbol **) s1p);
|
||||
register char *st2 = SYMBOL_NAME (*(struct partial_symbol **) s2p);
|
||||
register struct partial_symbol **s1, **s2;
|
||||
register char *st1, *st2;
|
||||
|
||||
s1 = (struct partial_symbol **) s1p;
|
||||
s2 = (struct partial_symbol **) s2p;
|
||||
st1 = SYMBOL_SOURCE_NAME (*s1);
|
||||
st2 = SYMBOL_SOURCE_NAME (*s2);
|
||||
|
||||
|
||||
if ((st1[0] - st2[0]) || !st1[0])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user