From e88c90f2c57f3b9f0d49af8f458f02eeba327a70 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 12 Oct 2001 23:51:30 +0000 Subject: 2001-10-12 Daniel Jacobowitz * 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 * mi-cmd-stack.c (list_args_or_locals): Use ALL_BLOCK_SYMBOLS. 2001-10-12 Daniel Jacobowitz * 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~ --- gdb/symtab.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/symtab.h') diff --git a/gdb/symtab.h b/gdb/symtab.h index 7ae9346..841da4d 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -467,6 +467,14 @@ struct block #define BLOCK_SUPERBLOCK(bl) (bl)->superblock #define BLOCK_GCC_COMPILED(bl) (bl)->gcc_compile_flag +/* Macro to loop through all symbols in a block BL. + i counts which symbol we are looking at, and sym points to the current + symbol. */ +#define ALL_BLOCK_SYMBOLS(bl, i, sym) \ + for ((i) = 0, (sym) = BLOCK_SYM ((bl), (i)); \ + (i) < BLOCK_NSYMS ((bl)); \ + ++(i), (sym) = BLOCK_SYM ((bl), (i))) + /* Nonzero if symbols of block BL should be sorted alphabetically. Don't sort a block which corresponds to a function. If we did the sorting would have to preserve the order of the symbols for the -- cgit v1.1