ba, ~ba (Breakpoint Address)

Syntax

~[[threadspec]] ba [[io]] option size address [[value]] [[cmd-string]]

Sets an address breakpoint at a given address. If threadspec is given, the breakpoints are set for the specified threads. If your program accesses memory at this address, the debugger stops execution and displays the current values of all registers and flags.

The option parameter specifies the type of breakpoint:

Option Action
E (executable) Breakpoint trap when the CPU fetches an instruction from the given address.
R (read only) Breakpoint trap when the CPU reads or writes a byte, word, or double-word at the given address.
W (read/write) Breakpoint trap when the CPU writes a byte, word, or double-word at the given address.

The io parameter is an optional value in the range 0–31.

The address parameter can specify any valid address. Offsets only are supported.

The size parameter is the size in bytes. It can be 1, 2, or 4.

The optional value parameter specifies the number of times the breakpoint is to be ignored before being taken. It can be any 16-bit value.

The cmd-string parameter specifies an optional list of commands to be executed each time the breakpoint is taken. Each command in the list can include parameters and is separated from the next command by a semicolon (;).

The bc, bd, be, and bl commands can all be used on these breakpoints.

This command is not implemented on MIPS or PowerPC.