mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 09:58:33 +08:00
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:
@ -1296,16 +1296,14 @@ add_local_symbols (struct collection_list *collect, CORE_ADDR pc,
|
||||
{
|
||||
struct symbol *sym;
|
||||
struct block *block;
|
||||
int i, nsyms, count = 0;
|
||||
int i, count = 0;
|
||||
|
||||
block = block_for_pc (pc);
|
||||
while (block != 0)
|
||||
{
|
||||
QUIT; /* allow user to bail out with ^C */
|
||||
nsyms = BLOCK_NSYMS (block);
|
||||
for (i = 0; i < nsyms; i++)
|
||||
ALL_BLOCK_SYMBOLS (block, i, sym)
|
||||
{
|
||||
sym = BLOCK_SYM (block, i);
|
||||
switch (SYMBOL_CLASS (sym))
|
||||
{
|
||||
default:
|
||||
@ -2335,7 +2333,7 @@ scope_info (char *args, int from_tty)
|
||||
struct minimal_symbol *msym;
|
||||
struct block *block;
|
||||
char **canonical, *symname, *save_args = args;
|
||||
int i, j, nsyms, count = 0;
|
||||
int i, j, count = 0;
|
||||
|
||||
if (args == 0 || *args == 0)
|
||||
error ("requires an argument (function, line or *addr) to define a scope");
|
||||
@ -2351,14 +2349,13 @@ scope_info (char *args, int from_tty)
|
||||
while (block != 0)
|
||||
{
|
||||
QUIT; /* allow user to bail out with ^C */
|
||||
nsyms = BLOCK_NSYMS (block);
|
||||
for (i = 0; i < nsyms; i++)
|
||||
ALL_BLOCK_SYMBOLS (block, i, sym)
|
||||
{
|
||||
QUIT; /* allow user to bail out with ^C */
|
||||
if (count == 0)
|
||||
printf_filtered ("Scope for %s:\n", save_args);
|
||||
count++;
|
||||
sym = BLOCK_SYM (block, i);
|
||||
|
||||
symname = SYMBOL_NAME (sym);
|
||||
if (symname == NULL || *symname == '\0')
|
||||
continue; /* probably botched, certainly useless */
|
||||
|
Reference in New Issue
Block a user