diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-10-12 16:53:06 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-10-12 16:53:06 +0000 |
commit | fba7f19cf6f801ee55018614b3a6f2ead2b1fb3b (patch) | |
tree | 9a674104d87390d60bc0e90aeedfdd43d23c875a /gdb/symfile.c | |
parent | 24376d1b58f62660beb3e5f9c2a7c135513ce27d (diff) | |
download | gdb-fba7f19cf6f801ee55018614b3a6f2ead2b1fb3b.zip gdb-fba7f19cf6f801ee55018614b3a6f2ead2b1fb3b.tar.gz gdb-fba7f19cf6f801ee55018614b3a6f2ead2b1fb3b.tar.bz2 |
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.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 5fc516b..02f0404 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -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]) { |