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~
This commit is contained in:
Daniel Jacobowitz
2001-10-12 23:51:30 +00:00
parent f4846649b3
commit e88c90f2c5
13 changed files with 63 additions and 68 deletions

View File

@@ -2992,9 +2992,8 @@ make_symbol_completion_list (char *text, char *word)
/* Also catch fields of types defined in this places which match our
text string. Only complete on types visible from current context. */
for (i = 0; i < BLOCK_NSYMS (b); i++)
ALL_BLOCK_SYMBOLS (b, i, sym)
{
sym = BLOCK_SYM (b, i);
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
if (SYMBOL_CLASS (sym) == LOC_TYPEDEF)
{
@@ -3023,9 +3022,8 @@ make_symbol_completion_list (char *text, char *word)
{
QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
for (i = 0; i < BLOCK_NSYMS (b); i++)
ALL_BLOCK_SYMBOLS (b, i, sym)
{
sym = BLOCK_SYM (b, i);
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
}
}
@@ -3037,9 +3035,8 @@ make_symbol_completion_list (char *text, char *word)
/* Don't do this block twice. */
if (b == surrounding_static_block)
continue;
for (i = 0; i < BLOCK_NSYMS (b); i++)
ALL_BLOCK_SYMBOLS (b, i, sym)
{
sym = BLOCK_SYM (b, i);
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
}
}
@@ -3143,16 +3140,14 @@ make_file_symbol_completion_list (char *text, char *word, char *srcfile)
symbols which match. */
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
for (i = 0; i < BLOCK_NSYMS (b); i++)
ALL_BLOCK_SYMBOLS (b, i, sym)
{
sym = BLOCK_SYM (b, i);
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
}
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
for (i = 0; i < BLOCK_NSYMS (b); i++)
ALL_BLOCK_SYMBOLS (b, i, sym)
{
sym = BLOCK_SYM (b, i);
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
}
@@ -3530,9 +3525,8 @@ make_symbol_overload_list (struct symbol *fsym)
/* Also catch fields of types defined in this places which match our
text string. Only complete on types visible from current context. */
for (i = 0; i < BLOCK_NSYMS (b); i++)
ALL_BLOCK_SYMBOLS (b, i, sym)
{
sym = BLOCK_SYM (b, i);
overload_list_add_symbol (sym, oload_name);
}
}
@@ -3544,9 +3538,8 @@ make_symbol_overload_list (struct symbol *fsym)
{
QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
for (i = 0; i < BLOCK_NSYMS (b); i++)
ALL_BLOCK_SYMBOLS (b, i, sym)
{
sym = BLOCK_SYM (b, i);
overload_list_add_symbol (sym, oload_name);
}
}
@@ -3558,9 +3551,8 @@ make_symbol_overload_list (struct symbol *fsym)
/* Don't do this block twice. */
if (b == surrounding_static_block)
continue;
for (i = 0; i < BLOCK_NSYMS (b); i++)
ALL_BLOCK_SYMBOLS (b, i, sym)
{
sym = BLOCK_SYM (b, i);
overload_list_add_symbol (sym, oload_name);
}
}