Loop
CP Disabled Loop
tern they are using to examine and rearrange files. Refer to the utilities publica­
tion for the operating system running in the virtual machine for information on
how to use the utilities. CMS users should use the DASD Dump Restore (DDR) service program to
print or move the data stored on direct access devices. The VM/SP DASD Dump Restore (DDR) program can be invoked by the CMS DDR command in
a virtual machine controlled by CMS. The DDR program has the following
functions:
DUMP --dumps part, or all, of the data from a DASD device to magnetic
tape.
RESTORE --transfers data from tapes created by DDR DUMP to a direct
access device. The direct access device to which the data is being restored
must be the same type of device as the direct access device originally con­
taining that data.
COpy --copies data from one device to another device of the same type.
Data may be reordered by cylinder (or by block number for fixed-block DASDs) when copied from disk to disk. In order to copy one tape to anoth­
er, the original tape must have been created by the DDR DUMP function.
PRINT --selectively prints the hexadecimal and EBCDIC representation of DASD and tape records on the virtual printer.
TYPE --selectively displays the hexadecimal and EBCDIC representation of DASD and tape records on the terminal. CMS users should refer to the VM/SP CMS Command and Macro Reference for
instructions on using the DDR command.
The real cause of a loop usually is an instruction that sets or branches on the condi­
tion code incorrectly. The existence of a loop can usually be recognized by the
ceasing of productive processing and a continual returning of the PSW instruction
address to the same address. If I/O operations are involved, and the loop is a very
large one, it may be extremely difficult to define, and may even comprise nested
loops. Probably, the most difficult case of looping to determine is entry to the loop
from a wild branch. The problem in loop analysis is finding either the instruction
that should open the loop or the instruction that passed control to the set of looping
instructions.
The processor operator should perform the following sequence when gathering
information to find the cause of a disabled loop.
1. Use the alter/display console mode to display the real PSW, general registers,
control registers and storage locations X'OO' - X'lOO'. On an attached processor or multiprocessor system, you must add the prefix
value for the PSA of the other processor (that is, the processor whose console
you are not using) to display, dump, or alter low core storage for the other
processor, or use the M or N operand prefixes described under the DCP, DMCP, and STCP commands.
Introduction to Debugging 483
Virtual Machine Disabled Loop
Virtual Machine Enabled Loop
2. Force a CP system restart to cause an abend dump to be taken.
3. Save the information collected for the system programmer or system support
personnel.
After the processor operator has collected the information, the system programmer
or system support personnel examine it.
1. If the cause of the loop is not apparent, examine the CP internal trace table to
determine the modules that may be involved in the loop.
2. If the cause is not yet determined, assume that a wild branch caused the loop
entry and search the source code for this wild branch.
When a disabled loop in a virtual machine exists, the virtual machine operator can­
not communicate with the virtual machine's operating system. That means that
signalling attention does not cause an interrupt.
Enter the CP console function mode.
1. Use the CP TRACE or CP PER commands to trace the entire loop. Display
general and extended control registers via the CP DISPLAY command.
2. Take a dump via the CP DUMP or CP VMDUMP command.
3. Examine the source code. Use the information just gathered, along with listings, to try to find the entry into
the loop.
If the operating system in the virtual machine itself manages virtual storage, it is
usually better to use that operating system's dump program. CP does not retrieve
pages that exist only on the virtual machine's paging device.
The virtual machine operator should perform the following sequence when attempt­
ing to find the cause of an enabled loop:
1. Use the CP TRACE or CP PER commands to trace the entire loop. Display
the PSW and the general registers.
2. If your virtual machine has the Extended Control (EC) mode and the EC
option, also display the control registers.
, 3. Use the CP DUMP or CP VMDUMP command to dump your virtual storage. CMS users can use the debug DUMP subcommand.
4. Consult the source code to search for the faulty instructions, examining previ­
ously executed modules if necessary. Begin by scanning for instructions that
set the condition code or branch on it.
5. If the manner of loop entry is still undetermined, assume that a wild branch has
occurred and begin a search for its origin.
484 VM/SP System Programmer's Guide
Previous Page Next Page