Specifies a directory search list, a directory search method, or
both a list and a method for source files.
Format
SET SOURCE directory-spec[, . . . ]
1 – Parameters
directory-spec
Specifies any part of an OpenVMS file specification (typically
a device/directory) that the debugger is to use by default
when searching for a source file. For any part of a full file
specification that you do not supply, the debugger uses the file
specification stored in the module's symbol record (that is, the
file specification that the source file had at compile time).
If you specify more than one directory in a single SET SOURCE
command, you create a source directory search list (you can
also specify a search list logical name that is defined at your
process level). In this case, the debugger locates the source
file by searching the first directory specified, then the second,
and so on, until it either locates the source file or exhausts
the list of directories.
2 – Qualifiers
2.1 /DISPLAY
Specifies the directory search list used when the debugger
displays source code. The default display search directory is
the compilation directory.
2.2 /EDIT
Specifies the directory search list used during execution of the
debugger's EDIT command. The default edit search directory is the
compilation directory.
2.3 /EXACT
/EXACT (default)
Specifies the directory search method used. In this case, the
debugger searches for the exact version of the source file, as
indicated in the debugger symbol table.
2.4 /LATEST
Specifies the directory search method used. In this case, the
debugger searches for the latest version of the source file, that
is, the highest-numbered version in your directory.
2.5 /MODULE
/MODULE=module-name
Specifies the directory search list used only for the designated
module. You can append one or more of the qualifiers listed above
to the SET SOURCE/MODULE command.
2.6 /ORIGINAL
(Applies to STDL programs only. Requires installation of the
Correlation Facility (a separate layered product) and invocation
of the kept debugger.) Specifies that the debugger display the
original STDL source file, rather than the intermediate files
produced during STDL compilation.
3 – Description
By default, the debugger expects a source file to be in the same
directory it was in at compile time. If a source file has been
moved to a different directory since compile time, use the SET
SOURCE command to specify a directory search list and search
method to locate the file.
Specifying the Directory Search List
A complete ODS-2 OpenVMS file specification has the following
format:
node::device:[directory]file-name.file-type;version-number
This format reflects the DECnet node name functionality used in
DECnet Phase IV that shipped with the OpenVMS operating system.
For more information, see the DECnet for OpenVMS Networking
Manual.
On OpenVMS systems running Version 6.1 or later and DECnet-
Plus for OpenVMS, a complete file specification can include
expanded node designations, called full names. Full names are
hierarchically structured DECnet-Plus for OpenVMS node names that
can be stored in a DECdns naming service. Full names can be a
maximum of 255 bytes long, in the following format:
namespace:.directory ... .directory.node-name
In this syntax statement, namespace identifies the global naming
service, directory ... .directory defines the hierarchical
directory path within the naming service, and node-name is the
specific object defining the DECnet node.
For information on full names and suggestions for setting up a
system of names, see the HP OpenVMS System Manager's Manual. For
information on DECnet-Plus for OpenVMS, see the DECnet-Plus for
OpenVMS Introduction and User's Guide.
If the full file specification of a source file exceeds 255
characters, the debugger cannot locate the file. You can work
around this problem by first defining a logical name "X" (at DCL
level) to expand to your long file specification, and then using
the SET SOURCE X command.
A SET SOURCE command with neither the /DISPLAY nor the /EDIT
qualifier changes both the display and edit search directories.
When compiling a program with the /DEBUG qualifier, if you use
a rooted-directory logical name to specify the location of the
source file, make sure that it is a concealed rooted-directory
logical name. If it is not concealed and you move the source file
to another directory after compilation, you cannot then use the
debugger SET SOURCE command to specify the new location of the
source file.
To create a concealed rooted-directory logical name, use the DCL
command DEFINE with the /TRANSLATION_ATTR=CONCEALED qualifier.
4 – Description, Continued...
Specifying the Directory Search Method
When you issue a SET SOURCE command, be aware that one of the
two qualifiers -/LATEST or /EXACT-will always be active. These
qualifiers affect the debugger search method. The /LATEST
qualifier directs the debugger to search for the version last
created (the highest-numbered version in your directory). The
/EXACT qualifier directs the debugger to search for the version
last compiled (the version recorded in the debugger symbol table
created at compile time). For example, a SET SOURCE/LATEST
command might search for SORT.FOR;3 while a SET SOURCE/EXACT
command might search for SORT.FOR;1.
If the debugger locates this version using the directory search
list, it checks that the creation or revision date and time,
file size, record format, and file organization are the same as
the original compile-time source file. If these characteristics
match, the debugger concludes that the original source file has
been located in its new directory.
If the debugger cannot locate this version using the directory
search list, it identifies the file that has the closest revision
date and time (if such a file exists in that directory) and
issues a NOTORIGSRC message ("original version of source file
not found") when first displaying the source code.
Specifying the /EDIT Qualifier
The /EDIT qualifier is needed when the files used for the display
of source code are different from the files to be edited by
using the EDIT command. This is the case with Ada programs. For
Ada programs, the (SET, SHOW, CANCEL) SOURCE commands affect
the search of files used for source display (the "copied"
source files in Ada program libraries); the (SET,SHOW,CANCEL)
SOURCE/EDIT commands affect the search of the source files you
edit when using the EDIT command. If you use /MODULE with /EDIT,
the effect of /EDIT is further qualified by /MODULE.
For information specific to Ada programs, see the
Language_Support Ada help topic.
Specifying the /ORIGINAL Qualifier
Before you can use the /ORIGINAL qualifier in a SET SOURCE
command, the Correlation Facility (a separate layered product)
must be installed on your system. Refer to Correlation Facility
documentation for information on creating a correlation library
before debugging.
Then, invoke the kept debugger and issue the SET SOURCE/ORIGINAL
command as follows:
$ DEBUG/KEEP
DBG> SET SOURCE/ORIGINAL
DBG> RUN filename.EXE
After issuing these commands, you can debug STDL source code in
the same way you debug any other supported language program.
Related commands:
(SHOW,CANCEL) SOURCE
5 – Examples
1.DBG> SHOW SOURCE
no directory search list in effect
DBG> SET SOURCE [PROJA],[PROJB],[PETER.PROJC]
DBG> SHOW SOURCE
source directory list for all modules,
match the latest source file version:
[PROJA]
[PROJB]
[PETER.PROJC]
In this example, the SET SOURCE command specifies that the
debugger should search directories [PROJA], [PROJB], and
[PETER.PROJC], in that order, for the latest version of source
files.
2.DBG> SET SOURCE /EXACT
DBG> SHOW SOURCE
no directory search list in effect,
match the exact source file
DBG> SET SOURCE [JONES]
DBG> SHOW SOURCE
source directory list for all modules,
match the exact source file version:
[JONES]
DBG> CANCEL SOURCE /EXACT
DBG> SHOW SOURCE
source directory list for all modules,
match the latest source file version:
[JONES]
In this example, the SET SOURCE/EXACT command establishes a
search method (exact version) that remains in effect for the
SET SOURCE [JONES] command. The CANCEL SOURCE/EXACT command not
only cancels SET SOURCE/EXACT command, but also affects the SET
SOURCE [JONES] command.