Rational Developer for System z, Version 7.6

Debugging across multiple processes and enclaves

There is a single Debug Tool session across all enclaves in a process. Breakpoints set in one process are restored when the new process begins in the new session.

In full-screen mode or batch mode, you can debug a non-POSIX program that spans more than one process, but Debug Tool can be active in only one process. In remote debug mode, you can debug a POSIX program that spans more than one process. The remote debugger can display each process.

When you are recording the statements that you run, data collection persists across multiple enclaves until you stop recording. When you replay your statements, the data is replayed across the enclave boundaries in the same order as they were recorded.

A commands file continues to execute its series of commands regardless of what level of enclave is entered.

Refer to the following topics for more information related to the material discussed in this topic.

Starting Debug Tool within an enclave

After an enclave in a process activates Debug Tool, it remains active throughout subsequent enclaves in the process, regardless of whether the run-time options for the enclave specify TEST or NOTEST. Debug Tool retains the settings specified from the TEST run-time option for the enclave that activated it, until you modify them with SET TEST. If your Debug Tool session includes more than one process, the settings for TEST are reset according to those specified on the TEST run-time option of the first enclave that activates Debug Tool in each new process.

If Debug Tool is first activated in a nested enclave of a process, and you step or go back to the parent enclave, you can debug the parent enclave. However, if the parent enclave contains COBOL but the nested enclave does not, Debug Tool is not active for the parent enclave, even upon return from the child enclave.

Upon activation of Debug Tool, the initial commands string, primary commands file, and the preferences file are run. They run only once, and affect the entire Debug Tool session. A new primary commands file cannot be started for a new enclave.

Viewing Debug Tool windows across multiple enclaves

When an enclave starts another enclave, all compile units in the first enclave are hidden. You can change the point of view to a new compile unit (by using the SET QUALIFY command) only if that compile unit is in the current enclave.

Ending a Debug Tool session within multiple enclaves

If you specify the NOPROMPT suboption of the TEST run time option for the next process on the host, Debug Tool restores the saved breakpoints after it gains control of that next process. However, Debug Tool might gain control of the process after many statements have been run. Therefore, Debug Tool might not run some or all of the following breakpoints:

If you have not used these breakpoint types, you can specify NOPROMPT.

In a single enclave, QUIT closes Debug Tool. For CICS® non-Language Environment programs (assembler or non-Language Environment COBOL), QUIT closes Debug Tool and the task ends with an ABEND 4038, regardless of the link level.

In a nested enclave, however, QUIT causes Debug Tool to signal a severity 3 condition that corresponds to Language Environment message CEE2529S. The system is trying to cleanly terminate all enclaves in the process.

Normally, the condition causes the current enclave to terminate. Then, the same condition will be raised in the parent enclave, which will also terminate. This sequence continues until all enclaves in the process have been terminated. As a result, you will see a CEE2529S message for each enclave that is terminated.

For CICS and MVS only: Depending on Language Environment® run-time settings, the application might be terminated with an ABEND 4038. This termination is normal and should be expected.

Using Debug Tool commands within multiple enclaves

Some Debug Tool commands and variables have a specific scope for enclaves and processes. The table below summarizes the behavior of specific Debug Tool commands and variables when you are debugging an application that consists of multiple enclaves.

Debug Tool command Affects current enclave only Affects entire Debug Tool session Comments
%CAAADDRESS X
AT GLOBAL X
AT TERMINATION X
CLEAR AT X X In addition to clearing breakpoints set in the current enclave, CLEAR AT can clear global breakpoints.
CLEAR DECLARE X
CLEAR VARIABLES X
Declarations X Session variables are cleared at the termination of the process in which they were declared.
DISABLE X X In addition to disabling breakpoints set in the current enclave, DISABLE can disable global breakpoints.
ENABLE X X In addition to enabling breakpoints set in the current enclave, ENABLE can enable global breakpoints.
LIST AT X X In addition to listing breakpoints set in the current enclave, LIST AT can list global breakpoints.
LIST CALLS X Applies to all systems except MVS batch and MVS with TSO. Under MVS batch and MVS with TSO, LIST CALLS lists the call chain for the current active thread in the current active enclave.

For programs containing interlanguage communication (ILC), routines from previous enclaves are only listed if they are coded in a language that is active in the current enclave.

Note:
Only compile units in the current thread will be listed for PL/I multitasking applications.
LIST EXPRESSION X You can only list variables in the currently active thread.
LIST LAST X
LIST NAMES CUS X Applies to compile unit names. In the Debug Frame window, compile units in parent enclaves are marked as deactivated.
LIST NAMES TEST X Applies to Debug Tool session variable names.
MONITOR GLOBAL X Applies to Global monitors.
PLAYBACK ENABLE X The PLAYBACK command that informs Debug Tool to begin the recording session.
PLAYBACK DISABLE X The PLAYBACK command that informs Debug Tool to stop the recording session.
PLAYBACK START X The PLAYBACK command that suspends execution of the program and indicates to Debug Tool to enter replay mode.
PLAYBACK STOP X The PLAYBACK command that terminates replay mode and resumes normal execution of Debug Tool.
PLAYBACK BACKWARD X The PLAYBACK command that indicates to Debug Tool to perform STEP and RUNTO commands backward, starting from the current point and going to previous points.
PLAYBACK FORWARD X The PLAYBACK command that indicates to Debug Tool to perform STEP and RUNTO commands forward, starting from the current point and going to the next point.
PROCEDURE X
SET AUTOMONITOR1 X Controls the monitoring of data items at the currently executing statement.
SET COUNTRY1 X This setting affects both your application and Debug Tool.

At the beginning of an enclave, the settings are those provided by Language Environment or your operating system. For nested enclaves, the parent’s settings are restored upon return from a child enclave.

SET EQUATE1 X
SET INTERCEPT1 X For C, intercepted streams or files cannot be part of any C I/O redirection during the execution of a nested enclave. For example, if stdout is intercepted in program A, program A cannot then redirect stdout to stderr when it does a system() call to program B. Also, not supported for PL/I.
SET NATIONAL LANGUAGE1 X This setting affects both your application and Debug Tool.

At the beginning of an enclave, the settings are those provided by Language Environment or your operating system. For nested enclaves, the parent’s settings are restored upon return from a child enclave.

SET PROGRAMMING LANGUAGE1 X Applies only to programming languages in which compile units known in the current enclave are written (a language is "known" the first time it is entered in the application flow).
SET QUALIFY1 X Can only be issued for load modules, compile units, and blocks that are known in the current enclave.
SET TEST1 X
TRIGGER condition2 X Applies to triggered conditions.2 Conditions can be either an Language Environment symbolic feedback code, or a language-oriented keyword or code, depending on the current programming language setting.
TRIGGER AT X X In addition to triggering breakpoints set in the current enclave, TRIGGER AT can trigger global breakpoints.
Notes:
  1. SET commands other than those listed in this table affect the entire Debug Tool session.
  2. If no active condition handler exists for the specified condition, the default condition handler can cause the program to end prematurely.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)