This is the mail archive of the gdb-patches@sources.redhat.com 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]

[patch/mi] Always send breakpoint headers to ui-out


Hello,

I've committed the attached.  It tweeks breakpoint.c so that the
breakpoint table headers are always sent to ui-out (and in turn either
cli-out or mi-out).  Since, at present, both MI and CLI discard the
headers when there are no breakpoints, this patch has no apparent affect.

The next patch tinkers mi-out so that the headers are always output.

	Andrew

2001-06-26  Andrew Cagney  <ac131313@redhat.com>

	* breakpoint.c (breakpoint_1): Always output the breakpoint
	headings.  Leave it to ui-out to decide which

Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.46
diff -p -r1.46 breakpoint.c
*** breakpoint.c	2001/06/21 15:39:52	1.46
--- breakpoint.c	2001/06/27 00:00:28
*************** breakpoint_1 (int bnum, int allflag)
*** 3598,3626 ****
  
  #ifdef UI_OUT
    if (nr_printable_breakpoints > 0)
!     {
!       annotate_breakpoints_headers ();
!       annotate_field (0);
!       ui_out_table_header (uiout, 3, ui_left, "number", "Num");		/* 1 */
!       annotate_field (1);
!       ui_out_table_header (uiout, 14, ui_left, "type", "Type");		/* 2 */
!       annotate_field (2);
!       ui_out_table_header (uiout, 4, ui_left, "disp", "Disp");		/* 3 */
!       annotate_field (3);
!       ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb");	/* 4 */
!       if (addressprint)
  	{
! 	  annotate_field (4);
  	  if (TARGET_ADDR_BIT <= 32)
  	    ui_out_table_header (uiout, 10, ui_left, "addr", "Address");/* 5 */
  	  else
  	    ui_out_table_header (uiout, 18, ui_left, "addr", "Address");/* 5 */
  	}
!       annotate_field (5);
!       ui_out_table_header (uiout, 40, ui_noalign, "what", "What");	/* 6 */
!       ui_out_table_body (uiout);
!       annotate_breakpoints_table ();
!     }
  #else
    if (nr_printable_breakpoints > 0)
      {
--- 3598,3631 ----
  
  #ifdef UI_OUT
    if (nr_printable_breakpoints > 0)
!     annotate_breakpoints_headers ();
!   if (nr_printable_breakpoints > 0)
!     annotate_field (0);
!   ui_out_table_header (uiout, 3, ui_left, "number", "Num");		/* 1 */
!   if (nr_printable_breakpoints > 0)
!     annotate_field (1);
!   ui_out_table_header (uiout, 14, ui_left, "type", "Type");		/* 2 */
!   if (nr_printable_breakpoints > 0)
!     annotate_field (2);
!   ui_out_table_header (uiout, 4, ui_left, "disp", "Disp");		/* 3 */
!   if (nr_printable_breakpoints > 0)
!     annotate_field (3);
!   ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb");	/* 4 */
!   if (addressprint)
  	{
! 	  if (nr_printable_breakpoints > 0)
! 	    annotate_field (4);
  	  if (TARGET_ADDR_BIT <= 32)
  	    ui_out_table_header (uiout, 10, ui_left, "addr", "Address");/* 5 */
  	  else
  	    ui_out_table_header (uiout, 18, ui_left, "addr", "Address");/* 5 */
  	}
!   if (nr_printable_breakpoints > 0)
!     annotate_field (5);
!   ui_out_table_header (uiout, 40, ui_noalign, "what", "What");	/* 6 */
!   ui_out_table_body (uiout);
!   if (nr_printable_breakpoints > 0)
!     annotate_breakpoints_table ();
  #else
    if (nr_printable_breakpoints > 0)
      {

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