Set or re-specify a software sticky breakpoint. by inserting an INT 3 instruction.
Syntax:
───┬─ BP ─┬─ addr ──┬───────────────┬─┬───────────────────┬── └─ BPn ─┘ └── passcount ──┘ ├─────── cmd ───────┤ └─ " ─── cmd ─┬─ " ─┘ │ └── ; ──┘
Parameters:
n
The default is to assign the lowest available number. If all 10 breakpoint numbers have been assigned then the following message appears:
Too many breakpointsaddr
The Kernel Debugger saves the byte of storage at the location specified by addr and inserts an INT 3 instruction in its place.
Notes
Whenever the Kernel Debugger is entered the storage overlayed by any breakpoints is temporarily restored. When the Kernel Debugger gives control back to the system, enabled breakpoints are re-instated.
If addr specifies the address of an existing breakpoint then the existing breakpoint is updated with the new parameters.
Each break-point address is recorded with its associated process context. For shared data this is of no consequence. However for private addresses, especially those in the private arena the addr may be qualified by slot number by using the | operator. This acts as a shorthand to save changing contexts using the .S command in order to set the breakpoint correctly. For example, suppose the current slot is 8, then:
BP 31 | %10032
is equivalent to:
.S 31 BP 31 | %10032 .S 8passcount
The default passcount is 1, that is, the breakpoint will fire on first encounter.
If no command string is specified then the default command string, as specified by the Z command will be executed.
Results & Notes:
If the specified address is valid then the breakpoint definition is accepted otherwise one of the following messages is generated:
Invalid linear address: %nnnnnnnnInvalid selector: selector:offset Past end of segment selector:offset
If the break-point is successfully defined then the in-built mnemonic BRn, where n corresponds to the break-point number, takes the value of the break-point address. This may be used in any address expression or any command.
Note:
Since BP break-points are implemented by the insertion of INT 3 instructions, it is possible for such break-points to become discarded if the page of code is discarded and subsequently paged back into memory.
If the .I command is used to swap in a page of code, then the break-points are automatically restored. (In earlier versions of OS/2 it was necessary to specify the B option of .I).
This complexity may be avoided by setting register break-points with the BR command.