ab [-rw] adr [mask]
|adr||specifies an address for the breakpoint.||mask||specifies an address optional mask.|
|-r||stop on a read access only|
|-w||stop on a write access only|
Because this command requires hardware support in the CPU that you are debugging, the number of data breakpoints is likely to be very limited.
The Monitor automatically assigns a number to each breakpoint. The Monitor allocates the lowest available breakpoint number from 0 to 31 to any new breakpoint.
The Monitor reports a new breakpoint's number immediately after the breakpoint is set (see the examples at the end of this subsection for illustration of this). The assigned numbers can be used in the db (Delete Breakpoint) command.
The brkcmd Variable
When a breakpoint is reached, the command list specified in the environment variable brkcmd is executed. The default setting for brkcmd is:
brkcmd = "l @pc 1"This command "l @pc 1", specifies that when the breakpoint occurs, the Monitor will disassemble one line starting at the address of the program counter.
You can change the breakpoint command variable with the set command. For example, you can include additional monitor commands in the brkcmd variable. You must separate additional commands on the command line with a semicolon. For example, entering the following command lists one line after reaching a breakpoint, and then displays all the register values.
set brkcmd "l @epc 1;r *"By default, breakpoints are cleared when the load command is executed. See the section on the load command later in this document for details on how to override automatic breakpoint clearing after a download operation.
Some examples illustrating the use of the ab command follow.
|PMON> ab a002000c||Set a breakpoint at 0xa002000c.|
|Bpt 1 = a002000c|
|PMON> ab -w 80021248||Stop on a write to 0x80021248.|
|PMON> ab 80021200 ffffff00||Stop on an access to any address in the range 0x80021200 thru 0x800212ff.|