* mi-cmd-stack.c (list_args_or_locals): Move declaration of

print_me inside the loop body, so it gets re-initialized every
iteration.  The cases for the different symbol kinds leave
print_me unchanged if they don't want the symbol printed.
This commit is contained in:
Jim Blandy
2002-02-05 19:28:36 +00:00
parent 6c537a5241
commit 39bf46527b
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2002-02-03 Jim Blandy <jimb@redhat.com>
* mi-cmd-stack.c (list_args_or_locals): Move declaration of
print_me inside the loop body, so it gets re-initialized every
iteration. The cases for the different symbol kinds leave
print_me unchanged if they don't want the symbol printed.
2002-01-22 Andrew Cagney <ac131313@redhat.com> 2002-01-22 Andrew Cagney <ac131313@redhat.com>
* gdbmi.texinfo: Remove makeinfo 3.12 hacks. * gdbmi.texinfo: Remove makeinfo 3.12 hacks.

View File

@ -214,7 +214,6 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
struct block *block; struct block *block;
struct symbol *sym; struct symbol *sym;
int i, nsyms; int i, nsyms;
int print_me = 0;
static struct ui_stream *stb = NULL; static struct ui_stream *stb = NULL;
stb = ui_out_stream_new (uiout); stb = ui_out_stream_new (uiout);
@ -227,6 +226,8 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
{ {
ALL_BLOCK_SYMBOLS (block, i, sym) ALL_BLOCK_SYMBOLS (block, i, sym)
{ {
int print_me = 0;
switch (SYMBOL_CLASS (sym)) switch (SYMBOL_CLASS (sym))
{ {
default: default: