operands  of  the  SET  command  are  set  ON;   the  EMSG  operand  is  set  to  TEXT;  
and the SMSG operand is setOFF.   To  verify  these  settings,  use  the  QUERY   SET  
command.
Commands to Collect and AIlaiyze SystelnInfonnatioll   This  section  discusses  six  commands  to  collect  and  analyze  system  information  
when you are debugging. These are theADSTOP   and  BEGIN  commands  and  the  
LOCATE,MONITOR,   PER,   and  TRACE  commands.  
StoppingVirtual'   Machine  Execution  at  a  Specific  Address  
TheADSTOP   command  stops  the  execution  of  a  virtual  machine  at  a  specific  
address; BEGIN causes the virtual machine to resume execution.
Execution halts when the instruction at the address specified in theADSTOP   command  is  reached.  At  this  point,  you  may  invoke  other  CP   debugging  com  
mands.
The address stop should be set after the program is loaded but before it executes.
When the specified location is reached during program execution, execution halts
and theCP   command  environment  is  entered.  You  may  then  enter  other  CP   com  
mands to examine and alter the status of the program.
Set an address stop at a location where you suspect the error in the program. You
can then display the registers, control words, and data areas to check the program
at that point in its execution. This procedure helps you locate program errors. You
may be able to alter the contents of storage in such a way that the program will
execute correctly. You can then correct the error you have detected and, if neces
sary, compile and execute the program again.
To successfully set an address stop, the virtual instruction address must be in real
storage at the time theADSTOP   command  is  issued.  
The RANGE keyword of theCP   PER   command  can  be  used  to  set  multiple  
address stops. However, unlike theCP   ADSTOP   command,  the  program  execution  
halts after the execution of the instruction at the given address. Note also that
address stops set using thePER   command  remain  in  effect  until  you  turn  off  the  
trace element set up by thePER   command.  There  is  no  need  for  the  program  to  
already be in storage before setting address stops with theCP   PER   command.  
Setting up mUltiple address stops withPER   is  accomplished  by  using  RANGE  as  an  
option to the INSTRUCT keyword. The instruction-addr-range, in this case, is a
single value corresponding to the address of the instruction where program exe
cution is to be halted.
For example,PER   INSTRUCT   RANGE  20000   causes  program  execution  to  halt  after  the  instruction  at  location  20000   executes.  PER   INSTRUCT   RANGE  20000   RANGE  20400   causes  a  program  to  halt  after  an  instruction  at  either  location  20000   or  20400   exe  
cutes.
Introduction to Debugging 499
and the SMSG operand is set
command.
Commands to Collect and AIlaiyze Systeln
when you are debugging. These are the
LOCATE,
Stopping
The
address; BEGIN causes the virtual machine to resume execution.
Execution halts when the instruction at the address specified in the
mands.
The address stop should be set after the program is loaded but before it executes.
When the specified location is reached during program execution, execution halts
and the
mands to examine and alter the status of the program.
Set an address stop at a location where you suspect the error in the program. You
can then display the registers, control words, and data areas to check the program
at that point in its execution. This procedure helps you locate program errors. You
may be able to alter the contents of storage in such a way that the program will
execute correctly. You can then correct the error you have detected and, if neces
sary, compile and execute the program again.
To successfully set an address stop, the virtual instruction address must be in real
storage at the time the
The RANGE keyword of the
address stops. However, unlike the
halts after the execution of the instruction at the given address. Note also that
address stops set using the
trace element set up by the
already be in storage before setting address stops with the
Setting up mUltiple address stops with
option to the INSTRUCT keyword. The instruction-addr-range, in this case, is a
single value corresponding to the address of the instruction where program exe
cution is to be halted.
For example,
cutes.
Introduction to Debugging 499
 
             
            
































































































































































































































































































































































































































































































































































































































