Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
If there are no breakpoints or watchpoints, the BreakpointTable body field is an
empty list.
GDB command
The corresponding GDB command is 'info break'.
Example
(gdb)
-break-list
^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"}]}
(gdb)
Here is an example of the result when there are no breakpoints:
(gdb)
-break-list
^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=[]}
(gdb)
The -break-watch command
Synopsis
-break-watch [ -a | -r ]
Create a watchpoint. With the '-a' option it will create an access watchpoint, that is a
watchpoint that triggers either on a read from or on a write to the memory location. With
the '-r' option, the watchpoint created is a read watchpoint, that is it will trigger only
when the memory location is accessed for reading. Without either of the options, the
watchpoint created is a regular watchpoint, that is it will trigger when the memory location
is accessed for writing. See “Enhanced support for watchpoints and breakpoints
(page 209).
Note that '-break-list' will report a single list of watchpoints and breakpoints inserted.
21.5 GDB/MI breakpoint table commands 317