^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
^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
^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
^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
^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
^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);
@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
@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
@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
^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
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
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
/* 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 */
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 */
{
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);
}
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 */
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");
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");