How does z/OS Debugger locate the C/C++ source file and the .dbg file?
If you compile with the
FORMAT(DWARF)
and FILE
suboptions
of the DEBUG
compiler option and specify NO for the
EQAOPTS MDBG
command1, z/OS® Debugger needs
the source file and the .dbg file. The following list describes
how z/OS Debugger searches
for those files: - z/OS Debugger reads
the source files for a CU each time it needs to display the source
code. z/OS Debugger searches
for the source file by using the name the compiler saved in the load
module or DLL. If you move the source files to a different location, z/OS Debugger searches
for the source file based on the input from the following commands,
user exit, or environment variable, in the following order:
- In full screen mode, the
SET SOURCE
command. - In remote debug mode, the EQA_SRC_PATH environment variable or what you enter in the Change Text File action from the editor view.
- The EQADEBUG DD statement.
- The EQAUEDAT user exit, specifying function code 3. If you specify the EQADEBUG DD statement, the EQAUEDAT user exit is not run.
- The
SET DEFAULT LISTINGS
command.
- In full screen mode, the
- z/OS Debugger might
read the .dbg file more than once, but it always reads this file from
the same data set. After z/OS Debugger locates
this file and validates its contents with the load module being debugged,
you cannot redirect z/OS Debugger to search
a different file. z/OS Debugger searches
for the .dbg file by using the name the compiler saved in the load
module or DLL. If you move the .dbg file to a different location, z/OS Debugger searches
for the .dbg file based on the input from the following commands,
user exit, or environment variable, in the following order:
- In remote debug mode, the EQA_DBG_PATH environment variable.
- The EQADBG DD statement.
- The EQAUEDAT user exit, specifying function code 35. If you specify the EQADBG DD statement, the EQAUEDAT user exit is not run.
- The
SET DEFAULT DBG
command.
To learn more about the DEBUG
compiler option,
the dbgld command, and the CDADBGLD utility, see z/OS XL C/C++ User's
Guide.
1 In situations where you
can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or NO,
which overrides any setting (including the default setting) of the EQAOPTS
MDBG
command.