[PATCH 37/40] fix breakpoint_1

Tom Tromey tromey@redhat.com
Thu May 9 18:53:00 GMT 2013


This is a stylistic change to make breakpoint_1 analyzable.

The issue here is maybe fixable in the analyzer with some work.

	* breakpoint.c (breakpoint_1): Introduce an outer null cleanup.
---
 gdb/breakpoint.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 1cfed3b..a9f1921 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -6372,16 +6372,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 ();
-- 
1.8.1.4



More information about the Gdb-patches mailing list