Inspect Manual
High-Level Inspect Commands
Inspect Manual—429164-006
6-24
BREAK
For example, this breakpoint generates break events on its 10th, 20th, and 30th
activations, and is then cleared:
BREAK para-1 EVERY 10 TEMP 3
Using the THEN Clause
The THEN clause, which requires quotes, enables you to execute a list of
commands whenever a break event is triggered. If you use RESUME in the
command list (it must be the last command in the list), Inspect resumes execution
of the current program. This stop-and-go feature has a variety of uses, including:
Resetting the value of a variable:
BREAK #loop.init THEN "MODIFY counter=1;RESUME"
Tracking the value of a variable:
BREAK #main.status THEN "DISPLAY status;RESUME"
Flagging execution of a certain piece of code:
BREAK #parse THEN "DISPLAY 'Parsing input';RESUME"
Setting a local data breakpoint, which must be done when the associated
procedure is active:
BREAK #loop.init THEN "BREAK counter; RESUME"
If you STEP onto a breakpoint with a RESUME in the THEN clause, your program
resumes.
Using OBEY in a THEN Clause
Using an OBEY command in a THEN clause can cause unexpected
synchronization behavior. For more information, see OBEY on page 6-152.
Usage Considerations for Data Breakpoints
Restrictions on Data Breakpoints
Inspect does not allow data breakpoints in PATHWAY requester programs. In
addition, Inspect allows only one data breakpoint at a time in each process or
PATHWAY server.
Change is the Default
If the type of data access that triggers the data breakpoint event is not specified,
the default is change. When data breakpoint is set to change, only memory writes
that change the value of the data location triggers the breakpoint.
The READ clause specifies that a break event should occur on both read and write
access of the data item.