public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  tromey/cleanup-checker: some fixes to infrun.c
@ 2013-05-07 17:58 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2013-05-07 17:58 UTC (permalink / raw)
  To: archer-commits

The branch, tromey/cleanup-checker has been updated
       via  f5d8768064370f71e441a6dd3e36c0a655a4909d (commit)
       via  feb6b240ba3b8287d7811e724f7d2a757f7036f8 (commit)
       via  93c05d00126fa73e466c98152a317bac44e0d706 (commit)
       via  80f1e1823a35cadae3cb9edbff07cb32db7a8fb5 (commit)
       via  f8df69f089276a755079574389e8c523fe9473ae (commit)
       via  6af776a4b12c249e38890870c5fd1f189c5c7476 (commit)
       via  1d8ed983a3058aa02fd4234dff64845cd372d589 (commit)
       via  b3a66cc8077f13c7825971a68b0f4dc1e24fe5ef (commit)
       via  0bdeb6063a6ec77247708b2895c535d1a81804c8 (commit)
      from  3f3e06f01707a6db8fdcc75c6d8ea9cd5e268367 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f5d8768064370f71e441a6dd3e36c0a655a4909d
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 7 11:57:54 2013 -0600

    some fixes to infrun.c

commit feb6b240ba3b8287d7811e724f7d2a757f7036f8
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 7 11:36:46 2013 -0600

    fix breakpoint.c

commit 93c05d00126fa73e466c98152a317bac44e0d706
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 7 11:34:59 2013 -0600

    introduce dangling_cleanup attribute and change source to use it

commit 80f1e1823a35cadae3cb9edbff07cb32db7a8fb5
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 7 10:55:56 2013 -0600

    fix mi-cmd-var.c

commit f8df69f089276a755079574389e8c523fe9473ae
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 7 10:54:48 2013 -0600

    fix cli-script.c

commit 6af776a4b12c249e38890870c5fd1f189c5c7476
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 7 09:23:12 2013 -0600

    fix mi-cmd-stack.c

commit 1d8ed983a3058aa02fd4234dff64845cd372d589
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 7 09:03:52 2013 -0600

    fix dbxread.c

commit b3a66cc8077f13c7825971a68b0f4dc1e24fe5ef
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 7 09:01:51 2013 -0600

    fix source.c

commit 0bdeb6063a6ec77247708b2895c535d1a81804c8
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 7 08:53:19 2013 -0600

    fix linux-thread-db.c

-----------------------------------------------------------------------

Summary of changes:
 gdb/ada-lang.c               |    1 +
 gdb/breakpoint.c             |   16 ++++++++--------
 gdb/c-exp.y                  |    1 +
 gdb/cli/cli-script.c         |   17 ++++++-----------
 gdb/coffread.c               |    1 +
 gdb/contrib/cleanup_check.py |   25 ++++++++++++++++++++++---
 gdb/dbxread.c                |   11 ++++++-----
 gdb/defs.h                   |    6 ++++++
 gdb/dwarf2read.c             |    8 ++++++++
 gdb/infrun.c                 |   18 +++++++++---------
 gdb/linux-nat.c              |    1 +
 gdb/linux-thread-db.c        |    8 ++++----
 gdb/mi/mi-cmd-stack.c        |    5 +----
 gdb/mi/mi-cmd-var.c          |   20 +++++++++-----------
 gdb/python/py-prettyprint.c  |    1 +
 gdb/source.c                 |    4 ++++
 gdb/stabsread.c              |    3 +++
 gdb/utils.h                  |    3 ++-
 18 files changed, 93 insertions(+), 56 deletions(-)

First 500 lines of diff:
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 2528adb..4c6456f 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4723,6 +4723,7 @@ is_package_name (const char *name)
 /* Return nonzero if SYM corresponds to a renaming entity that is
    not visible from FUNCTION_NAME.  */
 
+DANGLING_CLEANUP
 static int
 old_renaming_is_invisible (const struct symbol *sym, const char *function_name)
 {
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 46ed45e..d31a466 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -6385,16 +6385,15 @@ breakpoint_1 (char *args, int allflag,
 	}
     }
 
+  bkpttbl_chain = make_cleanup (null_cleanup, NULL);
   if (opts.addressprint)
-    bkpttbl_chain 
-      = make_cleanup_ui_out_table_begin_end (uiout, 6,
-					     nr_printable_breakpoints,
-                                             "BreakpointTable");
+    make_cleanup_ui_out_table_begin_end (uiout, 6,
+					 nr_printable_breakpoints,
+					 "BreakpointTable");
   else
-    bkpttbl_chain 
-      = make_cleanup_ui_out_table_begin_end (uiout, 5,
-					     nr_printable_breakpoints,
-                                             "BreakpointTable");
+    make_cleanup_ui_out_table_begin_end (uiout, 5,
+					 nr_printable_breakpoints,
+					 "BreakpointTable");
 
   if (nr_printable_breakpoints > 0)
     annotate_breakpoints_headers ();
@@ -14081,6 +14080,7 @@ addr_string_to_sals (struct breakpoint *b, char *addr_string, int *found)
    breakpoints.  Reevaluate the breakpoint and recreate its
    locations.  */
 
+DANGLING_CLEANUP
 static void
 breakpoint_re_set_default (struct breakpoint *b)
 {
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index dd032d2..a3ca6b8 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -1646,6 +1646,7 @@ write_destructor_name (struct stoken token)
 
 /* Returns a stoken of the operator name given by OP (which does not
    include the string "operator").  */ 
+DANGLING_CLEANUP
 static struct stoken
 operator_stoken (const char *op)
 {
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 43fd479..92621ab 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1246,7 +1246,7 @@ read_command_lines_1 (char * (*read_next_line_func) (void), int parse_commands,
 		      void (*validator)(char *, void *), void *closure)
 {
   struct command_line *head, *tail, *next;
-  struct cleanup *old_chain;
+  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
   enum command_control_type ret;
   enum misc_command_type val;
 
@@ -1298,22 +1298,17 @@ read_command_lines_1 (char * (*read_next_line_func) (void), int parse_commands,
       else
 	{
 	  head = next;
-	  old_chain = make_cleanup_free_command_lines (&head);
+	  make_cleanup_free_command_lines (&head);
 	}
       tail = next;
     }
 
   dont_repeat ();
 
-  if (head)
-    {
-      if (ret != invalid_control)
-	{
-	  discard_cleanups (old_chain);
-	}
-      else
-	do_cleanups (old_chain);
-    }
+  if (ret != invalid_control)
+    discard_cleanups (old_chain);
+  else
+    do_cleanups (old_chain);
 
   return head;
 }
diff --git a/gdb/coffread.c b/gdb/coffread.c
index bf39085..886f0b6 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -208,6 +208,7 @@ static void coff_symtab_read (long, unsigned int, struct objfile *);
    section flags to specify what kind of debug section it is
    -kingdon).  */
 
+DANGLING_CLEANUP
 static void
 coff_locate_sections (bfd *abfd, asection *sectp, void *csip)
 {
diff --git a/gdb/contrib/cleanup_check.py b/gdb/contrib/cleanup_check.py
index 17b81f6..dca0ec8 100644
--- a/gdb/contrib/cleanup_check.py
+++ b/gdb/contrib/cleanup_check.py
@@ -58,6 +58,14 @@ special_names = set(['do_final_cleanups', 'discard_final_cleanups',
 def needs_special_treatment(decl):
     return decl.name in special_names
 
+leaks_cleanup = { }
+
+def note_dangling_cleanup(*args):
+    leaks_cleanup[str(args[0].name)] = 1
+
+def leaves_dangling_cleanup(name):
+    return name in leaks_cleanup
+
 # Sometimes we need a new placeholder object that isn't the same as
 # anything else.
 class Dummy(object):
@@ -204,6 +212,10 @@ class CleanupChecker:
             if stmt.loc:
                 curloc = stmt.loc
             if isinstance(stmt, gcc.GimpleCall) and stmt.fndecl:
+                # The below used to also have:
+                #  or leaves_dangling_cleanup(str(stmt.fndecl.name))
+                # but this yields a lot of noise when the point
+                # is really just to pretend that these functions are ok.
                 if is_constructor(stmt.fndecl):
                     log('saw constructor %s in bb=%d' % (str(stmt.fndecl), bb.index), 2)
                     self.cleanup_aware = True
@@ -223,7 +235,7 @@ class CleanupChecker:
                     if not master_cleanup.verify(curloc, stmt.retval, bb_from):
                         gcc.permerror(curloc,
                                       'constructor does not return master cleanup')
-                elif not self.is_special_constructor:
+                elif not self.is_special_constructor and not leaves_dangling_cleanup(str(self.fun.decl.name)):
                     if not master_cleanup.isempty():
                         if curloc not in self.bad_returns:
                             gcc.permerror(curloc, 'cleanup stack is not empty at return')
@@ -273,8 +285,8 @@ class CleanupChecker:
         if str(self.fun.decl.name) == 'gdb_xml_create_parser_and_cleanup_1':
             self.is_special_constructor = True
 
-        if self.is_special_constructor:
-            gcc.inform(self.fun.start, 'function %s is a special constructor' % (self.fun.decl.name))
+        # if self.is_special_constructor:
+        #     gcc.inform(self.fun.start, 'function %s is a special constructor' % (self.fun.decl.name))
 
         # If we only see do_cleanups calls, and this function is not
         # itself a constructor, then we can convert it easily to RAII.
@@ -307,6 +319,13 @@ class CheckerPass(gcc.GimplePass):
         if fun.decl:
             log(fun.decl.name + ': ' + what, 2)
 
+def register_attributes():
+    gcc.register_attribute('dangling_cleanup', 0, 0, True, False, False,
+                           note_dangling_cleanup)
+    gcc.define_macro('WITH_ATTRIBUTE_DANGLING_CLEANUP')
+
+gcc.register_callback(gcc.PLUGIN_ATTRIBUTES, register_attributes)
+
 ps = CheckerPass(name = 'check-cleanups')
 # We need the cfg, but we want a relatively high-level Gimple.
 ps.register_after('release_ssa')
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 01dc1bf..f137145 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2449,7 +2449,6 @@ static void
 dbx_read_symtab (struct partial_symtab *self, struct objfile *objfile)
 {
   bfd *sym_bfd;
-  struct cleanup *back_to = NULL;
 
   if (self->readin)
     {
@@ -2461,6 +2460,8 @@ dbx_read_symtab (struct partial_symtab *self, struct objfile *objfile)
 
   if (LDSYMLEN (self) || self->number_of_dependencies)
     {
+      struct cleanup *back_to;
+
       /* Print the message now, before reading the string table,
          to avoid disconcerting pauses.  */
       if (info_verbose)
@@ -2473,6 +2474,8 @@ dbx_read_symtab (struct partial_symtab *self, struct objfile *objfile)
 
       next_symbol_text_func = dbx_next_symbol_text;
 
+      back_to = make_cleanup (null_cleanup, NULL);
+
       if (DBX_STAB_SECTION (objfile))
 	{
 	  stabs_data
@@ -2481,14 +2484,12 @@ dbx_read_symtab (struct partial_symtab *self, struct objfile *objfile)
 					      NULL);
 
 	  if (stabs_data)
-	    back_to = make_cleanup (free_current_contents,
-				    (void *) &stabs_data);
+	    make_cleanup (free_current_contents, (void *) &stabs_data);
 	}
 
       dbx_psymtab_to_symtab_1 (objfile, self);
 
-      if (back_to)
-	do_cleanups (back_to);
+      do_cleanups (back_to);
 
       /* Match with global symbols.  This only needs to be done once,
          after all of the symtabs and dependencies have been read in.   */
diff --git a/gdb/defs.h b/gdb/defs.h
index d8a1adb..f82fc17 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -98,6 +98,12 @@
 #include "libiberty.h"
 #include "hashtab.h"
 
+#ifdef WITH_ATTRIBUTE_DANGLING_CLEANUP
+#define DANGLING_CLEANUP __attribute__((dangling_cleanup))
+#else
+#define DANGLING_CLEANUP
+#endif
+
 /* Rather than duplicate all the logic in BFD for figuring out what
    types to use (which can be pretty complicated), symply define them
    in terms of the corresponding type from BFD.  */
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 2b4d8ad..c2cd5b3 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -4436,6 +4436,7 @@ init_cu_die_reader (struct die_reader_specs *reader,
    provided an abbrev table to use.
    The result is non-zero if a valid (non-dummy) DIE was found.  */
 
+DANGLING_CLEANUP
 static int
 read_cutu_die_from_dwo (struct dwarf2_per_cu_data *this_cu,
 			struct dwo_unit *dwo_unit,
@@ -8060,6 +8061,7 @@ find_file_and_directory (struct die_info *die, struct dwarf2_cu *cu,
    COMP_DIR is the compilation directory.
    WANT_LINE_INFO is non-zero if the pc/line-number mapping is needed.  */
 
+DANGLING_CLEANUP
 static void
 handle_DW_AT_stmt_list (struct die_info *die, struct dwarf2_cu *cu,
 			const char *comp_dir) /* ARI: editCase function */
@@ -8176,6 +8178,7 @@ read_file_scope (struct die_info *die, struct dwarf2_cu *cu)
    then restore those symtabs in the line header.
    We don't need the pc/line-number mapping for type units.  */
 
+DANGLING_CLEANUP
 static void
 setup_type_unit_groups (struct die_info *die, struct dwarf2_cu *cu)
 {
@@ -10711,6 +10714,7 @@ handle_data_member_location (struct die_info *die, struct dwarf2_cu *cu,
 
 /* Add an aggregate field to the field list.  */
 
+DANGLING_CLEANUP
 static void
 dwarf2_add_field (struct field_info *fip, struct die_info *die,
 		  struct dwarf2_cu *cu)
@@ -10898,6 +10902,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
 
 /* Add a typedef defined in the scope of the FIP's class.  */
 
+DANGLING_CLEANUP
 static void
 dwarf2_add_typedef (struct field_info *fip, struct die_info *die,
 		    struct dwarf2_cu *cu)
@@ -11061,6 +11066,7 @@ dwarf2_is_constructor (struct die_info *die, struct dwarf2_cu *cu)
 
 /* Add a member function to the proper fieldlist.  */
 
+DANGLING_CLEANUP
 static void
 dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
 		      struct type *type, struct dwarf2_cu *cu)
@@ -15367,6 +15373,7 @@ dwarf_decode_line_header (unsigned int offset, struct dwarf2_cu *cu)
 
    The function creates dangling cleanup registration.  */
 
+DANGLING_CLEANUP
 static const char *
 psymtab_include_file_name (const struct line_header *lh, int file_index,
 			   const struct partial_symtab *pst,
@@ -15768,6 +15775,7 @@ dwarf_decode_lines_1 (struct line_header *lh, const char *comp_dir,
    E.g. expand_line_sal requires this when finding psymtabs to expand.
    A good testcase for this is mb-inline.exp.  */
 
+DANGLING_CLEANUP
 static void
 dwarf_decode_lines (struct line_header *lh, const char *comp_dir,
 		    struct dwarf2_cu *cu, struct partial_symtab *pst,
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 54e92f2..4e7091e 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -665,7 +665,7 @@ handle_vfork_child_exec_or_exit (int exec)
       if (inf->vfork_parent->pending_detach)
 	{
 	  struct thread_info *tp;
-	  struct cleanup *old_chain;
+	  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
 	  struct program_space *pspace;
 	  struct address_space *aspace;
 
@@ -677,12 +677,12 @@ handle_vfork_child_exec_or_exit (int exec)
 	    {
 	      /* If we're handling a child exit, then inferior_ptid
 		 points at the inferior's pid, not to a thread.  */
-	      old_chain = save_inferior_ptid ();
+	      save_inferior_ptid ();
 	      save_current_program_space ();
 	      save_current_inferior ();
 	    }
 	  else
-	    old_chain = save_current_space_and_thread ();
+	    save_current_space_and_thread ();
 
 	  /* We're letting loose of the parent.  */
 	  tp = any_live_thread_of_process (inf->vfork_parent->pid);
@@ -2803,10 +2803,11 @@ fetch_inferior_event (void *client_data)
   /* If an error happens while handling the event, propagate GDB's
      knowledge of the executing state to the frontend/user running
      state.  */
+  ts_old_chain = make_cleanup (null_cleanup, NULL);
   if (!non_stop)
-    ts_old_chain = make_cleanup (finish_thread_state_cleanup, &minus_one_ptid);
+    make_cleanup (finish_thread_state_cleanup, &minus_one_ptid);
   else
-    ts_old_chain = make_cleanup (finish_thread_state_cleanup, &ecs->ptid);
+    make_cleanup (finish_thread_state_cleanup, &ecs->ptid);
 
   /* Get executed before make_cleanup_restore_current_thread above to apply
      still for the thread which has thrown the exception.  */
@@ -3004,10 +3005,10 @@ adjust_pc_after_break (struct execution_control_state *ecs)
   if (software_breakpoint_inserted_here_p (aspace, breakpoint_pc)
       || (non_stop && moribund_breakpoint_here_p (aspace, breakpoint_pc)))
     {
-      struct cleanup *old_cleanups = NULL;
+      struct cleanup *old_cleanups = make_cleanup (null_cleanup, NULL);
 
       if (RECORD_IS_USED)
-	old_cleanups = record_full_gdb_operation_disable_set ();
+	record_full_gdb_operation_disable_set ();
 
       /* When using hardware single-step, a SIGTRAP is reported for both
 	 a completed single-step and a software breakpoint.  Need to
@@ -3033,8 +3034,7 @@ adjust_pc_after_break (struct execution_control_state *ecs)
 	  || ecs->event_thread->prev_pc == breakpoint_pc)
 	regcache_write_pc (regcache, breakpoint_pc);
 
-      if (RECORD_IS_USED)
-	do_cleanups (old_cleanups);
+      do_cleanups (old_cleanups);
     }
 }
 
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 6ba71ba..6859449 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -4301,6 +4301,7 @@ linux_nat_thread_name (struct thread_info *thr)
 /* Accepts an integer PID; Returns a string representing a file that
    can be opened to get the symbols for the child process.  */
 
+DANGLING_CLEANUP
 static char *
 linux_child_pid_to_exec_file (int pid)
 {
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index a698c65..23c29c9 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1029,17 +1029,17 @@ thread_db_load_search (void)
 	      || this_dir[pdir_len] == '/'))
 	{
 	  char *subdir = NULL;
-	  struct cleanup *free_subdir_cleanup = NULL;
+	  struct cleanup *free_subdir_cleanup
+	    = make_cleanup (null_cleanup, NULL);
 
 	  if (this_dir[pdir_len] == '/')
 	    {
 	      subdir = xmalloc (strlen (this_dir));
-	      free_subdir_cleanup = make_cleanup (xfree, subdir);
+	      make_cleanup (xfree, subdir);
 	      strcpy (subdir, this_dir + pdir_len + 1);
 	    }
 	  rc = try_thread_db_load_from_pdir (subdir);
-	  if (free_subdir_cleanup != NULL)
-	    do_cleanups (free_subdir_cleanup);
+	  do_cleanups (free_subdir_cleanup);
 	  if (rc)
 	    break;
 	}
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 062cd5d..4de78ac 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -250,7 +250,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;
 
@@ -268,7 +267,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)
@@ -311,8 +310,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);
 }
 
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 558454e..c2e8b7a 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -441,14 +441,12 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
 
   if (from < to)
     {
-      struct cleanup *cleanup_children;
+      struct cleanup *cleanup_children = make_cleanup (null_cleanup, NULL);
 
       if (mi_version (uiout) == 1)
-	cleanup_children
-	  = make_cleanup_ui_out_tuple_begin_end (uiout, "children");
+	make_cleanup_ui_out_tuple_begin_end (uiout, "children");
       else
-	cleanup_children
-	  = make_cleanup_ui_out_list_begin_end (uiout, "children");
+	make_cleanup_ui_out_list_begin_end (uiout, "children");
       for (ix = from;
 	   ix < to && VEC_iterate (varobj_p, children, ix, child);
 	   ++ix)
@@ -702,10 +700,11 @@ mi_cmd_var_update (char *command, char **argv, int argc)
   else
     print_values = PRINT_NO_VALUES;
 
+  cleanup = make_cleanup (null_cleanup, NULL);
   if (mi_version (uiout) <= 1)
-    cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, "changelist");
+    make_cleanup_ui_out_tuple_begin_end (uiout, "changelist");
   else
-    cleanup = make_cleanup_ui_out_list_begin_end (uiout, "changelist");
+    make_cleanup_ui_out_list_begin_end (uiout, "changelist");
 
   /* Check if the parameter is a "*", which means that we want to
      update all variables.  */
@@ -741,7 +740,6 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
 		   int explicit)
 {
   struct ui_out *uiout = current_uiout;
-  struct cleanup *cleanup = NULL;
   VEC (varobj_update_result) *changes;
   varobj_update_result *r;
   int i;
@@ -752,9 +750,10 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
     {
       char *display_hint;
       int from, to;
+      struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
 
       if (mi_version (uiout) > 1)
-        cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+	make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
       ui_out_field_string (uiout, "name", varobj_get_objname (r->varobj));
 
       switch (r->status)
@@ -828,8 +827,7 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
 	  r->new = NULL;	/* Paranoia.  */


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-07 17:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-07 17:58 [SCM] tromey/cleanup-checker: some fixes to infrun.c tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).