This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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);
 	    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]