summaryrefslogtreecommitdiff
path: root/gdb/mdebugread.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2001-10-12 23:51:30 +0000
committerDaniel Jacobowitz <drow@false.org>2001-10-12 23:51:30 +0000
commite88c90f2c57f3b9f0d49af8f458f02eeba327a70 (patch)
tree29a0c0f7dc975bd6a98b0362c9cc0679c91eab0c /gdb/mdebugread.c
parentf4846649b32c8b6020a6a89c436963c044b63464 (diff)
downloadbinutils-gdb-e88c90f2c57f3b9f0d49af8f458f02eeba327a70.tar.gz
2001-10-12 Daniel Jacobowitz <drow@mvista.com>
* symtab.h (struct block): (ALL_BLOCK_SYMBOLS): New macro. * symtab.c (find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS. (make_symbol_completion_list): Likewise. (make_symbol_overload_list): Likewise. * buildsym.c (finish_block): Likewise. * breakpoint.c (get_catch_sals): Likewise. * mdebugread.c (mylookup_symbol): Likewise. * objfiles.c (objfile_relocate): Likewise. * printcmd.c (print_frame_args): Likewise. * stack.c (print_block_frame_locals): Likewise. (print_block_frame_labels): Likewise. (print_frame_arg_vars): Likewise. * symmisc.c (dump_symtab): Likewise. * tracepoint.c (add_local_symbols): Likewise. (scope_info): Likewise. 2001-10-12 Daniel Jacobowitz <drow@mvista.com> * mi-cmd-stack.c (list_args_or_locals): Use ALL_BLOCK_SYMBOLS. 2001-10-12 Daniel Jacobowitz <drow@mvista.com> * generic/gdbtk-cmds.c (gdb_listfuncs): Use ALL_BLOCK_SYMBOLS. * generic/gdbtk-stack.c (gdb_block_vars): Likewise. (gdb_get_blocks): Likewise. (gdb_get_vars_command): Likewise. 5~
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r--gdb/mdebugread.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index ed7e490850e..130a4582348 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -3853,22 +3853,19 @@ static struct symbol *
mylookup_symbol (char *name, register struct block *block,
namespace_enum namespace, enum address_class class)
{
- register int bot, top, inc;
- register struct symbol *sym;
+ int i, inc;
+ struct symbol *sym;
- bot = 0;
- top = BLOCK_NSYMS (block);
inc = name[0];
- while (bot < top)
+ ALL_BLOCK_SYMBOLS (block, i, sym)
{
- sym = BLOCK_SYM (block, bot);
if (SYMBOL_NAME (sym)[0] == inc
&& SYMBOL_NAMESPACE (sym) == namespace
&& SYMBOL_CLASS (sym) == class
&& strcmp (SYMBOL_NAME (sym), name) == 0)
return sym;
- bot++;
}
+
block = BLOCK_SUPERBLOCK (block);
if (block)
return mylookup_symbol (name, block, namespace, class);