aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-03-03 18:34:12 +0000
committerDavid Carlton <carlton@bactrian.org>2003-03-03 18:34:12 +0000
commit8e43749752917ad2777c89e45218a7256f05547c (patch)
tree6281e60277aec8fcfcb64dea97c76b9ab458f284 /gdb/symtab.c
parent25120b0d7a5d5e498fa200d6d14d8ee2cf0cb493 (diff)
downloadgdb-8e43749752917ad2777c89e45218a7256f05547c.zip
gdb-8e43749752917ad2777c89e45218a7256f05547c.tar.gz
gdb-8e43749752917ad2777c89e45218a7256f05547c.tar.bz2
2003-03-03 David Carlton <carlton@math.stanford.edu>
* symtab.h (DEPRECATED_SYMBOL_MATCHES_NAME): Rename from SYMBOL_MATCHES_NAME, add comment. (SYMBOL_MATCHES_NATURAL_NAME): New. * minsyms.c (lookup_minimal_symbol_solib_trampoline): Replace SYMBOL_MATCHES_NAME with DEPRECATED_SYMBOL_MATCHES_NAME. (lookup_minimal_symbol, lookup_minimal_symbol_text): Ditto. * symtab.c (lookup_partial_symbol): Use SYMBOL_MATCHES_NATURAL_NAME, not SYMBOL_MATCHES_NAME. Delete unhelpful comment. (lookup_block_symbol): Use SYMBOL_MATCHES_NATURAL_NAME, not SYMBOL_MATCHES_NAME. Fix for PR c++/33.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index af07d77..9ecbd54 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1423,10 +1423,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, int global,
if (!(top == bottom))
internal_error (__FILE__, __LINE__, "failed internal consistency check");
- /* djb - 2000-06-03 - Use SYMBOL_MATCHES_NAME, not a strcmp, so
- we don't have to force a linear search on C++. Probably holds true
- for JAVA as well, no way to check.*/
- while (top <= real_top && SYMBOL_MATCHES_NAME (*top,name))
+ while (top <= real_top && SYMBOL_MATCHES_NATURAL_NAME (*top,name))
{
if (SYMBOL_NAMESPACE (*top) == namespace)
{
@@ -1445,7 +1442,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, int global,
{
if (namespace == SYMBOL_NAMESPACE (*psym))
{
- if (SYMBOL_MATCHES_NAME (*psym, name))
+ if (SYMBOL_MATCHES_NATURAL_NAME (*psym, name))
{
return (*psym);
}
@@ -1623,7 +1620,7 @@ lookup_block_symbol (register const struct block *block, const char *name,
if (SYMBOL_NAMESPACE (sym) == namespace
&& (mangled_name
? strcmp (DEPRECATED_SYMBOL_NAME (sym), mangled_name) == 0
- : SYMBOL_MATCHES_NAME (sym, name)))
+ : SYMBOL_MATCHES_NATURAL_NAME (sym, name)))
return sym;
}
return NULL;
@@ -1693,7 +1690,7 @@ lookup_block_symbol (register const struct block *block, const char *name,
if (SYMBOL_NAMESPACE (sym) == namespace
&& (mangled_name
? strcmp (DEPRECATED_SYMBOL_NAME (sym), mangled_name) == 0
- : SYMBOL_MATCHES_NAME (sym, name)))
+ : SYMBOL_MATCHES_NATURAL_NAME (sym, name)))
{
return sym;
}
@@ -1728,7 +1725,7 @@ lookup_block_symbol (register const struct block *block, const char *name,
if (SYMBOL_NAMESPACE (sym) == namespace
&& (mangled_name
? strcmp (DEPRECATED_SYMBOL_NAME (sym), mangled_name) == 0
- : SYMBOL_MATCHES_NAME (sym, name)))
+ : SYMBOL_MATCHES_NATURAL_NAME (sym, name)))
{
/* If SYM has aliases, then use any alias that is active
at the current PC. If no alias is active at the current