aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.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/tracepoint.c
parentf4846649b32c8b6020a6a89c436963c044b63464 (diff)
downloadgdb-e88c90f2c57f3b9f0d49af8f458f02eeba327a70.zip
gdb-e88c90f2c57f3b9f0d49af8f458f02eeba327a70.tar.gz
gdb-e88c90f2c57f3b9f0d49af8f458f02eeba327a70.tar.bz2
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/tracepoint.c')
-rw-r--r--gdb/tracepoint.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 2e5cd73..57d2ae2 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -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 */