aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-08-30 03:24:00 +0000
committerJim Blandy <jimb@codesourcery.com>2002-08-30 03:24:00 +0000
commitc7612d53196a8b287ff54bdfd0ce8429e31738db (patch)
tree757ea79bb2382804a849a116cdf7e2d396ef6f9d /gdb
parent80977a89c9972d39974e4b7c429f8d05022487cb (diff)
downloadgdb-c7612d53196a8b287ff54bdfd0ce8429e31738db.zip
gdb-c7612d53196a8b287ff54bdfd0ce8429e31738db.tar.gz
gdb-c7612d53196a8b287ff54bdfd0ce8429e31738db.tar.bz2
* symtab.c (lookup_symbol_aux): In the cases where we find a
minimal symbol of an appropriate name and use its address to select a symtab to read and search, use `name' (as passed to us) as the demangled name when searching the symtab's global and static blocks, not the minsym's name.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/symtab.c25
2 files changed, 25 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7515c7f..7d40d33 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2002-08-29 Jim Blandy <jimb@redhat.com>
+
+ * symtab.c (lookup_symbol_aux): In the cases where we find a
+ minimal symbol of an appropriate name and use its address to
+ select a symtab to read and search, use `name' (as passed to us)
+ as the demangled name when searching the symtab's global and
+ static blocks, not the minsym's name.
+
2002-08-29 Keith Seitz <keiths@redhat.com>
* stack.c (print_frame_info_base): Always set current_source_symtab
diff --git a/gdb/symtab.c b/gdb/symtab.c
index d39962e..c18625a 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -860,15 +860,20 @@ lookup_symbol_aux (const char *name, const char *mangled_name,
/* This is a function which has a symtab for its address. */
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
- mangled_name, namespace);
+
+ /* This call used to pass `SYMBOL_NAME (msymbol)' as the
+ `name' argument to lookup_block_symbol. But the name
+ of a minimal symbol is always mangled, so that seems
+ to be clearly the wrong thing to pass as the
+ unmangled name. */
+ sym = lookup_block_symbol (block, name, mangled_name, namespace);
/* We kept static functions in minimal symbol table as well as
in static scope. We want to find them in the symbol table. */
if (!sym)
{
block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
- sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
- mangled_name, namespace);
+ sym = lookup_block_symbol (block, name,
+ mangled_name, namespace);
}
/* sym == 0 if symbol was found in the minimal symbol table
@@ -1027,15 +1032,19 @@ lookup_symbol_aux (const char *name, const char *mangled_name,
{
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
- mangled_name, namespace);
+ /* This call used to pass `SYMBOL_NAME (msymbol)' as the
+ `name' argument to lookup_block_symbol. But the name
+ of a minimal symbol is always mangled, so that seems
+ to be clearly the wrong thing to pass as the
+ unmangled name. */
+ sym = lookup_block_symbol (block, name, mangled_name, namespace);
/* We kept static functions in minimal symbol table as well as
in static scope. We want to find them in the symbol table. */
if (!sym)
{
block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
- sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
- mangled_name, namespace);
+ sym = lookup_block_symbol (block, name,
+ mangled_name, namespace);
}
/* If we found one, return it */
if (sym)