This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Display sub-breakpoints in the correct tuple format
- From: David Narvaez <david dot narvaez at computer dot org>
- To: gdb-patches at sourceware dot org
- Date: Wed, 19 Dec 2012 14:17:12 -0500
- Subject: Display sub-breakpoints in the correct tuple format
Resending this patch, that was sent to the bug tracker for bug #9659
--- a/gdb/breakpoint.c
+++ a/gdb/breakpoint.c
@@ -5896,8 +5896,14 @@ print_one_breakpoint (struct breakpoint *b,
for (loc = b->loc; loc; loc = loc->next, ++n)
{
- struct cleanup *inner2 =
- make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+ char * bkptn = 0;
+ int bkptn_size = snprintf(bkptn, 0, "%s%d", "bkpt", n);
+ struct cleanup *inner2;
+
+ bkptn = calloc(bkptn_size + 1, sizeof(char));
+ snprintf(bkptn, bkptn_size + 1, "%s%d", "bkpt", n);
+ inner2 = make_cleanup_ui_out_tuple_begin_end (uiout, bkptn);
+ free(bkptn);
print_one_breakpoint_location (b, loc, n, last_loc, allflag);
do_cleanups (inner2);
}