11. Breakpoint Commands
Breakpoint commands are used to set the value of breakpoint variables. These commands are only valid within breakpoints and watchpoints. They are sent from the host to the target as data in BREAKPOINT_DATA commands. Figure 71 contains a summary of breakpoint commands:
Command Description
------------------------+-------------------------------------
INCREMENT <location> Increment the specified location
INC_COUNT Increment the breakpoint counter
OR OR two breakpoint condition lists
SET_PTR <n> <location> Set pointer <n> to the contents of
<location>
SET_STATE <n> Set the breakpoint state variable
to <n>
Breakpoint Command Summary
Figure 71
11.1 INCREMENT Command
The INCREMENT command increments the contents of a specified location. The location may be in any address space writable from LDP.
0 0 0 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+---------------+---------------+
0 | 14 |
+---------------+---------------+
1 | BREAKPOINT | INCREMENT |
+---------------+---------------+
2 | |
+-- --+
3 | Address |
+-- --+
4 | |
+-- --+
5 | |
+-- --+
6 | |
+---------------+---------------+
INCREMENT Command Format
Figure 72
INCREMENT FIELDS:
Address
The full address of the location whose contents are to be incremented.
11.2 INC_COUNT Command
The INC_COUNT command increments the breakpoint counter. There is one counter variable for each breakpoint. It is initialized to zero when the breakpoint is created, when it is armed with the START command, and whenever the breakpoint state changes. The counter is tested by the COUNT_* conditions.
0 0 0 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+---------------+---------------+
0 | 4 |
+---------------+---------------+
1 | BREAKPOINT | INC_COUNT |
+---------------+---------------+
INC_COUNT Command Format
Figure 73
11.3 OR Command
The OR command delineates two and_lists in a breakpoint condition list. A condition list is TRUE if any of the OR separated and_lists in it are TRUE. A breakpoint condition list may contain zero, one or, many OR commands. See 'Condition Commands' for an explanation of condition lists.
0 0 0 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+---------------+---------------+
0 | 4 |
+---------------+---------------+
1 | BREAKPOINT | OR |
+---------------+---------------+
OR Command Format
Figure 74
11.4 SET_PTR Command
The SET_PTR command loads the specified breakpoint pointer with the contents of a location. The pointer variables and the SET_PTR command are intended to provide a primitive but unlimited indirect addressing capability. Two addressing modes, BPT_PTR_OFFSET and BPT_PTR_INDIRECT, are used for referencing the breakpoint pointers. For example, to follow a linked list, use SET_PTR to load a pointer with the start of the list, then use successive SET_PTR commands with addressing mode BPT_PTR_OFFSET to get successive elements.
0 0 0 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+---------------+---------------+
0 | 16 |
+---------------+---------------+
1 | BREAKPOINT | SET_PTR |
+---------------+---------------+
2 | Pointer |
+---------------+---------------+
3 | |
+-- --+
4 | Address |
+-- --+
5 | |
+-- --+
6 | |
+-- --+
7 | |
+---------------+---------------+
SET_PTR Command Format
Figure 75
SET_PTR FIELDS:
Pointer
The pointer to be changed. Allowable values are 0 and 1.
Address
The full address of the location whose contents are to be loaded into the given pointer variable.
11.5 SET_STATE Command
The SET_STATE command sets the breakpoint state variable to the specified value. This is the only method of changing a breakpoint's state from within a breakpoint. The breakpoint's state may be also be changed by a START command from the host. The state variable is initialized to zero when the breakpoint is created.
0 0 0 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+---------------+---------------+
0 | 6 |
+---------------+---------------+
1 | BREAKPOINT | SET_STATE |
+---------------+---------------+
2 | State Value |
+-------------------------------+
SET_STATE Command Format
Figure 76
SET_STATE FIELDS:
State Value
The new value for the breakpoint state variable. Must not be greater than the maximum state value specified in the CREATE BREAKPOINT command that created this breakpoint.