aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-30 17:35:40 +0000
committerTom Tromey <tromey@redhat.com>2013-05-30 17:35:40 +0000
commitcd82eddcf152515d67367cdca3fefdfe2aa31b7f (patch)
tree9311ff9967ece56626ae18c051bdeb6dd10b94bc
parent57cee33aeea77d8c6760ae27162b627f9687c32c (diff)
downloadgdb-cd82eddcf152515d67367cdca3fefdfe2aa31b7f.zip
gdb-cd82eddcf152515d67367cdca3fefdfe2aa31b7f.tar.gz
gdb-cd82eddcf152515d67367cdca3fefdfe2aa31b7f.tar.bz2
fix mi-cmd-stack.c
mi-cmd-stack.d had a conditional cleanup, "cleanup_tuple" that confused the checker. However, there was no need for this, since it was only used via do_cleanups at the end of the function, just before another call to do_cleanups. So, while this is a stylistic patch for the checker, I also consider it a generic improvement for readers of the code. * mi/mi-cmd-stack.c (list_arg_or_local): Remove "cleanup_tuple".
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mi/mi-cmd-stack.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 96c19fa..5c999c0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-05-30 Tom Tromey <tromey@redhat.com>
+ * mi/mi-cmd-stack.c (list_arg_or_local): Remove
+ "cleanup_tuple".
+
+2013-05-30 Tom Tromey <tromey@redhat.com>
+
* dbxread.c (dbx_read_symtab): Declare 'back_to' in a more
inner scope. Unconditionally call do_cleanups.
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 1cd9a47..dd365f3 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -397,7 +397,6 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
enum print_values values)
{
struct cleanup *old_chain;
- struct cleanup *cleanup_tuple = NULL;
struct ui_out *uiout = current_uiout;
struct ui_file *stb;
@@ -415,7 +414,7 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
&& (arg->val || arg->error)));
if (values != PRINT_NO_VALUES || what == all)
- cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+ make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
fputs_filtered (SYMBOL_PRINT_NAME (arg->sym), stb);
if (arg->entry_kind == print_entry_values_only)
@@ -458,8 +457,6 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
ui_out_field_stream (uiout, "value", stb);
}
- if (values != PRINT_NO_VALUES || what == all)
- do_cleanups (cleanup_tuple);
do_cleanups (old_chain);
}