For MI>0, output full breakpoint table header information. Output the
authorAndrew Cagney <cagney@redhat.com>
Wed, 27 Jun 2001 17:27:08 +0000 (17:27 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 27 Jun 2001 17:27:08 +0000 (17:27 +0000)
breakpoint table body as a list.

gdb/mi/ChangeLog
gdb/mi/gdbmi.texinfo
gdb/mi/mi-out.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/ChangeLog
gdb/testsuite/gdb.mi/mi-basics.exp
gdb/testsuite/gdb.mi/mi-break.exp
gdb/testsuite/gdb.mi/mi-disassemble.exp
gdb/testsuite/gdb.mi/mi-simplerun.exp
gdb/testsuite/gdb.mi/mi-watch.exp
gdb/testsuite/lib/mi-support.exp

index 3bafadf0704ba8b3784b80ee3c4cdf0b84025daf..2611b4559d589732ec88b29a939942f6f38cd230 100644 (file)
@@ -1,3 +1,17 @@
+2001-06-27  Andrew Cagney  <ac131313@redhat.com>
+
+       * mi-out.c (mi_table_begin): Include nr_cols and nr_rows in mi1
+       table output.
+       * mi-out.c (mi_table_begin): Only suppress output when mi0. Change
+       the header to a list.
+       (mi_table_body): For mi1, close the header list and open a table
+       body list.
+       (mi_table_end): For mi1, close the body list.
+       (mi_table_header): For mi1, output a tuple containing all the
+       header information.
+       (mi_open, mi_close): Reverse logic of mi_version test.
+       * gdbmi.texinfo (GDB/MI Breakpoint Table Commands): Update.
+
 2001-06-26  Andrew Cagney  <ac131313@redhat.com>
 
        * gdbmi.texinfo (GDB/MI Output Syntax): Delete reference to query
index 2f9dc8d78e6957db51b72ddb1dacf94c3e603b39..ae69649d4f82aa44c2a867476100f0d0ee2b14ff 100644 (file)
@@ -588,10 +588,16 @@ The corresponding @value{GDBN} command is @samp{ignore}.
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
-ignore="3"@}@}
+ignore="3"@}]@}
 (@value{GDBP})
 @end smallexample
 
@@ -630,10 +636,16 @@ The corresponding @value{GDBN} command is @samp{condition}.
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
-times="0",ignore="3"@}@}
+times="0",ignore="3"@}]@}
 (@value{GDBP})
 @end smallexample
 
@@ -661,7 +673,14 @@ The corresponding @value{GDBN} command is @samp{delete}.
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{@}
+^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[]@}
 (@value{GDBP})
 @end example
 
@@ -689,9 +708,15 @@ The corresponding @value{GDBN} command is @samp{disable}.
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}@}
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
 (@value{GDBP})
 @end smallexample
 
@@ -718,9 +743,15 @@ The corresponding @value{GDBN} command is @samp{enable}.
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}@}
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
 (@value{GDBP})
 @end smallexample
 
@@ -818,11 +849,17 @@ The corresponding @value{GDBN} commands are @samp{break}, @samp{tbreak},
 ^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c",line="11"@}
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"@},
 bkpt=@{number="2",type="breakpoint",disp="del",enabled="y",
-addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}@}
+addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}]@}
 (@value{GDBP})
 -break-insert -r foo.*
 ~int foo(int, int);
@@ -861,7 +898,7 @@ number of times the breakpoint has been hit
 @end table
 
 If there are no breakpoints or watchpoints, the @code{BreakpointTable}
-field is an empty list.
+@code{body} field is an empty list.
 
 @subsubheading @value{GDBN} Command
 
@@ -872,11 +909,17 @@ The corresponding @value{GDBN} command is @samp{info break}.
 @smallexample
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@},
 bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
-addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}@}
+addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}]@}
 (@value{GDBP})
 @end smallexample
 
@@ -885,7 +928,14 @@ Here's an example of the result when there are no breakpoints:
 @smallexample
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{@}
+^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[]@}
 (@value{GDBP})
 @end smallexample
 
@@ -967,12 +1017,18 @@ deleted.
 ^done,wpt=@{number="2",exp="C"@}
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x00010734",func="callee4",
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
 bkpt=@{number="2",type="watchpoint",disp="keep",
-enabled="y",addr="",what="C",times="0"@}@}
+enabled="y",addr="",what="C",times="0"@}]@}
 (@value{GDBP})
 -exec-continue
 ^running
@@ -982,12 +1038,18 @@ frame=@{func="callee4",args=[],
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x00010734",func="callee4",
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
 bkpt=@{number="2",type="watchpoint",disp="keep",
-enabled="y",addr="",what="C",times="-5"@}@}
+enabled="y",addr="",what="C",times="-5"@}]@}
 (@value{GDBP})
 -exec-continue
 ^running
@@ -997,10 +1059,16 @@ value="0x11940 \"A string argument.\""@}],
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x00010734",func="callee4",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}@}
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}]@}
 (@value{GDBP})
 @end smallexample
 
index 6787b528267909807e1f5b4ce1f973ac7a5865d0..040e2e409103b4eee46dd6689b6a014ab735800a 100644 (file)
@@ -105,18 +105,26 @@ static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
 /* Mark beginning of a table */
 
 void
-mi_table_begin (struct ui_out *uiout, int nbrofcols,
+mi_table_begin (struct ui_out *uiout,
+               int nr_cols,
                int nr_rows,
                const char *tblid)
 {
   struct ui_out_data *data = ui_out_data (uiout);
   mi_open (uiout, tblid, ui_out_type_tuple);
-  if (nr_rows == 0)
+  if (data->mi_version == 0)
     {
-      data->suppress_output = 1;
+      if (nr_rows == 0)
+       data->suppress_output = 1;
+      else
+       mi_open (uiout, "hdr", ui_out_type_list);
       return;
     }
-  mi_open (uiout, "hdr", ui_out_type_tuple);
+  mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/,
+               "nr_rows", nr_rows);
+  mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/,
+               "nr_cols", nr_cols);
+  mi_open (uiout, "hdr", ui_out_type_list);
 }
 
 /* Mark beginning of a table body */
@@ -125,10 +133,13 @@ void
 mi_table_body (struct ui_out *uiout)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  /* close the table header line if there were any headers */
   if (data->suppress_output)
     return;
-  mi_close (uiout, ui_out_type_tuple);
+  /* close the table header line if there were any headers */
+  mi_close (uiout, ui_out_type_list);
+  if (data->mi_version == 0)
+    return;
+  mi_open (uiout, "body", ui_out_type_list);
 }
 
 /* Mark end of a table */
@@ -138,6 +149,12 @@ mi_table_end (struct ui_out *uiout)
 {
   struct ui_out_data *data = ui_out_data (uiout);
   data->suppress_output = 0;
+  if (data->mi_version == 0)
+    {
+      mi_close (uiout, ui_out_type_tuple);
+      return;
+    }
+  mi_close (uiout, ui_out_type_list); /* body */
   mi_close (uiout, ui_out_type_tuple);
 }
 
@@ -151,7 +168,17 @@ mi_table_header (struct ui_out *uiout, int width, int alignment,
   struct ui_out_data *data = ui_out_data (uiout);
   if (data->suppress_output)
     return;
-  mi_field_string (uiout, 0, width, alignment, 0, colhdr);
+  if (data->mi_version == 0)
+    {
+      mi_field_string (uiout, 0, width, alignment, 0, colhdr);
+      return;
+    }
+  mi_open (uiout, NULL, ui_out_type_tuple);
+  mi_field_int (uiout, 0, 0, 0, "width", width);
+  mi_field_int (uiout, 0, 0, 0, "alignment", alignment);
+  mi_field_string (uiout, 0, 0, 0, "col_name", col_name);
+  mi_field_string (uiout, 0, width, alignment, "colhdr", colhdr);
+  mi_close (uiout, ui_out_type_tuple);
 }
 
 /* Mark beginning of a list */
@@ -337,10 +364,10 @@ mi_open (struct ui_out *uiout,
       fputc_unfiltered ('{', data->buffer);
       break;
     case ui_out_type_list:
-      if (data->mi_version > 0)
-       fputc_unfiltered ('[', data->buffer);
-      else
+      if (data->mi_version == 0)
        fputc_unfiltered ('{', data->buffer);
+      else
+       fputc_unfiltered ('[', data->buffer);
       break;
     default:
       internal_error (__FILE__, __LINE__, "bad switch");
@@ -358,10 +385,10 @@ mi_close (struct ui_out *uiout,
       fputc_unfiltered ('}', data->buffer);
       break;
     case ui_out_type_list:
-      if (data->mi_version > 0)
-       fputc_unfiltered (']', data->buffer);
-      else
+      if (data->mi_version == 0)
        fputc_unfiltered ('}', data->buffer);
+      else
+       fputc_unfiltered (']', data->buffer);
       break;
     default:
       internal_error (__FILE__, __LINE__, "bad switch");
index f3f54e6db54a131698ccff96b34973c0824526b8..72f06e1b37e956e3aeb9bff3cb389a32dd7676a2 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-27  Andrew Cagney  <ac131313@redhat.com>
+
+       * lib/mi-support.exp (mi_delete_breakpoints): Accept mi1 format
+       empty breakpoint tables.
+
 2001-06-25  Andrew Cagney  <ac131313@redhat.com>
 
        * lib/mi-support.exp: Update args=... part of stop-reason
index 44edb047382db765544af32f3d4430b3fd8300bc..cbd4462a347f82301d4e82029edea1651b127714 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-27  Andrew Cagney  <ac131313@redhat.com>
+
+       * mi-disassemble.exp: Update to accept mi1 breakpoint tables.
+       * mi-basics.exp: Ditto.
+       * mi-simplerun.exp: Ditto.
+       * mi-watch.exp: Ditto. Add check for full header.
+       * mi-break.exp: Ditto. Add check for full header.
+
 2001-06-26  Andrew Cagney  <ac131313@redhat.com>
 
        * mi-stack.exp: Update.  Output for args=... and
index bb9c7cf68493a969653c87bbeb138f065f8ba713..4913d8f8b35e6011ebe3972380ed5ab1f86e3572 100644 (file)
@@ -139,7 +139,7 @@ proc test_breakpoints_deletion {} {
              "break-delete (all) operation"
 
     mi_gdb_test "201-break-list" \
-             ".*\\\^done,BreakpointTable=\\\{\\\}" \
+             ".*\\\^done,BreakpointTable=\\\{.*,body=\\\[\\\]\\\}" \
              "all breakpoints removed"
 }
 
index 44c8ac1a621f5ac1e544c25cdb17671ee6ab0c87..5cbe4e40d2ef4a2a2a4c0af933b422a08b2b31e5 100644 (file)
@@ -79,7 +79,7 @@ proc test_tbreak_creation_and_listing {} {
              "insert temp breakpoint at \"<fullfilename>\":6 (callee4)"
 
     mi_gdb_test "666-break-list" \
-                "666\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
+           "666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}.*\\\]\}" \
                 "list of breakpoints"
 
     mi_gdb_test "777-break-delete" \
@@ -123,7 +123,7 @@ proc test_rbreak_creation_and_listing {} {
 
     setup_xfail "*-*-*"
     mi_gdb_test "166-break-list" \
-                "166\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
+           "1\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
                 "list of breakpoints"
 
     mi_gdb_test "177-break-delete" \
index dc1943e3f13944dcf481057a7bff984d81c99289..9d6fbc5398d37a85f358831c99b4ff6632dd052b 100644 (file)
@@ -61,7 +61,7 @@ proc test_breakpoints_creation_and_listing {} {
              "break-insert operation"
 
     mi_gdb_test "204-break-list" \
-                "204\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\}" \
+                "204\\^done,BreakpointTable=\{.*,body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \
                 "list of breakpoints"
 }
 
index f3929eb79f8f26216c9c0ce265d456d4f4a75f95..20ee341c669306514155e61082f0e1d3c4516213 100644 (file)
@@ -78,7 +78,7 @@ proc test_breakpoints_creation_and_listing {} {
              "insert breakpoint at \"<fullfilename>\":6 (callee4)"
 
     mi_gdb_test "204-break-list" \
-                "204\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
+           "204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
                 "list of breakpoints"
 
     mi_gdb_test "205-break-disable 2 3 4" \
@@ -86,7 +86,7 @@ proc test_breakpoints_creation_and_listing {} {
                 "disabling of breakpoints"
 
     mi_gdb_test "206-break-info 2" \
-                "206\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"2\",.*,enabled=\"n\",.*\}\}" \
+           "206\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"2\",.*,enabled=\"n\",.*\}\\\]\}" \
                 "list of breakpoints, 16 disabled"
 }
 
index 4c3cadd01ee3d7175ce776d3769474a156a8b38d..7a09bd888f1955ed9deb535279141ddeb5d4abcc 100644 (file)
@@ -62,7 +62,7 @@ proc test_watchpoint_creation_and_listing {} {
              "break-watch operation"
 
     mi_gdb_test "222-break-list" \
-                "222\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\}" \
+           "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \
                 "list of watchpoints"
 
 }
@@ -83,7 +83,7 @@ proc test_awatch_creation_and_listing {} {
              "break-watch -a operation"
 
     mi_gdb_test "444-break-list" \
-                "444\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
+           "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
                 "list of watchpoints awatch"
 
     mi_gdb_test "777-break-delete 3" \
@@ -107,7 +107,7 @@ proc test_rwatch_creation_and_listing {} {
              "break-insert -r operation"
 
     mi_gdb_test "300-break-list" \
-                "300\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
+           "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\}\}" \
                 "list of breakpoints"
 
     mi_gdb_test "177-break-delete 4" \
index 2a69851e54ba5548adb23194eb25fed96edd86f2..2f48ebef1b16ffbcdce6957752838d23e0ef620c 100644 (file)
@@ -206,6 +206,7 @@ proc mi_delete_breakpoints {} {
     send_gdb "103-break-list\n"
     gdb_expect 30 {
         -re "103-break-list\r\n103\\\^done,BreakpointTable=\{\}\r\n$mi_gdb_prompt$" {}
+        -re "103-break-list\r\n103\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[\\\]\}" {}
         -re "103-break-list\r\n103\\\^doneNo breakpoints or watchpoints.\r\n\r\n$mi_gdb_prompt$" {warning "Unexpected console text received"}
         -re "$mi_gdb_prompt$" { perror "Breakpoints not deleted" ; return }
         -re "Delete all breakpoints.*or n.*$" {