aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-02-05 19:28:36 +0000
committerJim Blandy <jimb@codesourcery.com>2002-02-05 19:28:36 +0000
commit39bf46527b510510051c37d12638e5b3af6ac739 (patch)
tree3a8ecb88eebc0b475117e899e281b6a5068c4612 /gdb/mi
parent6c537a5241d79759c6a8fe93b6770bb6c9afb46d (diff)
downloadgdb-39bf46527b510510051c37d12638e5b3af6ac739.zip
gdb-39bf46527b510510051c37d12638e5b3af6ac739.tar.gz
gdb-39bf46527b510510051c37d12638e5b3af6ac739.tar.bz2
* 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.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/ChangeLog7
-rw-r--r--gdb/mi/mi-cmd-stack.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 282b342..2d69629 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -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.
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index f6c7d10..0e4bdf4 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -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: