Inspect Manual

High-Level Inspect Commands
Inspect Manual429164-006
6-23
BREAK
This item is qualified using the scope path current at breakpoint definition:
Identifiers used to specify the break location
These items are qualified using the input radix and the scope path current at
breakpoint activation:
Numbers appearing in the expression of the IF clause
Identifiers appearing in the expression of the IF clause
Identifiers appearing in the command string of the THEN clause
Debugging Loops
When debugging loops, you can use the EVERY clause to break only on certain
iterations. For example, suppose a loop malfunctions on the 32nd iteration (or
every 32nd iteration). If you set an unconditional breakpoint in the loop, it will stop
execution 31 times before getting to the point at which the loop malfunctions. If
you add EVERY 32 to that unconditional breakpoint, execution won't be stopped
until it gets to the point you want.
Testing EVERY and IF Clauses
If you use EVERY and IF together, Inspect tests the EVERY clause before testing
the IF clause. That is, Inspect tests the IF clause only if the EVERY test passes.
For example, Inspect tests the IF clause of this breakpoint only on every 42nd
activation:
BREAK para-1 EVERY 42 IF c < 100
The condition of this breakpoint is “on every 42nd iteration break if C is less than
100” instead of “break every 42nd time that C is less than 100.”
Debugging a Backup Process
When debugging a fault-tolerant process pair on a TNS/R system, remember that
Inspect puts breakpoints in the primary process unless you use the BACKUP
clause. After you have put breakpoints in the backup process, you can stop the
primary process (using either the command interpreter STOP command or the
INSPECT STOP command) to force control to pass to the backup process.
If a fault-tolerant process pair alters its home terminal, activation of a breakpoint in
the backup process might cause IMON to start a new Inspect process.
Note that you cannot debug a backup process on a TNS/E system; the BACKUP
option is disabled because the backup process is not owned by the debugger on a
TNS/E system.
Using the TEMP Clause
A breakpoint normally remains in effect until you explicitly clear it using the CLEAR
command. Frequently, however, you might want a breakpoint that triggers a break
event a limited number of times (usually once), and then clears itself automatically.
The TEMP clause provides this feature.