This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 37/40] fix breakpoint_1
- From: Tom Tromey <tromey at redhat dot com>
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 09 May 2013 12:52:56 -0600
- Subject: [PATCH 37/40] fix breakpoint_1
- References: <cover dot 1368124285 dot git dot tromey at redhat dot com>
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