Native Inspect Manual (H06.04+)

Using Native Inspect With COBOL Programs
Native Inspect Manual528122-005
3-9
Machine-Level Debugging
Machine-Level Debugging
Native Inspect provides a full set of commands for machine-level debugging. These
commands enable you to perform such low-level tasks as examining memory,
examining registers, and listing machine-level instructions. One such command, the x
command, provides a special form for use with COBOL programs. The x command,
when used with the ADDRESS OF clause, is useful for generating memory dumps.
This command has the form
x /format ADDRESS OF variable
where format specifies a repeat count, the format to use, and the size of the variable
to be examined; and variable is a variable to be used as the starting address of the
memory dump.
For more information about the x command, see x command on page 4-80.
Execution Control
You control execution of a program by setting breakpoints at locations in the program
where you want execution to be suspended. As discussed previously, you can identify
locations in a COBOL program using program unit and paragraph names, in addition to
source line numbers. Once program execution is suspended, you resume execution by
entering a continue command.
A program executes until it:
Encounters a breakpoint
Calls the DEBUG or PROCESS_DEBUG_ procedure
Generates a trap
Terminates
You can also use the following Native Inspect commands to incrementally advance
program execution:
step command. This command advances program execution one verb at a time.
Execution steps into any PERFORM or program unit invocations executed within
the step range.
next command. This command advances program execution one verb at a time.
Execution steps over any PERFORM or program unit invocations executed within
the step range.
finish command. This command executes the current process until execution either
returns from the current program unit or encounters a debugging event.