* mi-cmd-stack.c (list_args_or_locals): Move declaration of
authorJim Blandy <jimb@codesourcery.com>
Tue, 5 Feb 2002 19:28:36 +0000 (19:28 +0000)
committerJim Blandy <jimb@codesourcery.com>
Tue, 5 Feb 2002 19:28:36 +0000 (19:28 +0000)
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.

gdb/mi/ChangeLog
gdb/mi/mi-cmd-stack.c

index 282b342e893008aca3df5d9dad88f8d1f8b86db6..2d69629846f33bad6fded7f4f66c19125130a471 100644 (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>
 
        * gdbmi.texinfo: Remove makeinfo 3.12 hacks.
index f6c7d103c6c2bc8bd5a8ae106a7e45b7d04f4745..0e4bdf4a0e7ab519d97be486ccbb19b5230b480d 100644 (file)
@@ -214,7 +214,6 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
   struct block *block;
   struct symbol *sym;
   int i, nsyms;
-  int print_me = 0;
   static struct ui_stream *stb = NULL;
 
   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)
        {
+          int print_me = 0;
+
          switch (SYMBOL_CLASS (sym))
            {
            default: