Chapter Contents |
Previous |
Next |
Cross-Debugging |
The SAS/C
Debugger's
set
command is best used in the debugger PROFILE
to specify search lists for source, include, and debugger files, as well as
a cache location for your debugger file. However, the
set
command may also be issued on the command line. The following reference section
describes both the
set search
subcommand and the
set cache
subcommand.
set |
ABBREVIATION |
se{t}
FORMAT |
set subcommand subcommand-arguments
DESCRIPTION |
The
set
command has two subcommands:
search
and
cache
. The
set search
command is used
to control the search templates that are used to access debugger and source
files, and the
set cache
command is used to specify a cache location for debugger files. The
set cache
command also uses a
template to specify this location.
The
set search
and
set cache
subcommands are described in the following paragraphs.
search SUBCOMMAND |
The
search
subcommand is used to establish a search list,
control tracing, add, or remove templates from a search list. The
search
subcommand has the following forms:
Format | Example |
---|---|
1 |
set search
file-tag
=|+|-
"template1" ["template2"
...] |
2 |
set search
file-tag
=
|
3 |
set search
file-tag
|* ?
|
4 |
set search
file-tag
|* trace on|trace off
|
Format 1: This format of the
set
command specifies a search list for the type of files designated by file-tag. Each search list consists of one or more templates that are
used by the debugger to locate debugger or source file types.
The =|+|- argument is used as follows:
You can include a percent character (
%
) in a template by specifying two percent
characters
successively (
%%
).
The filenames generated by the application of the conversion
specifiers in the template are passed to the
fopen
function, which opens
the appropriate file for the debugger to access. If these files are located
on a remote host, the SAS/C Connectivity
Support Library is used to establish an NFS connection between the local and
remote host.
"path:dbgfiledir/%leafname"
If
%leafname
consists of a base and an
extension, a functionally equivalent template could be specified as follows:
"path:dbgfiledir/%basename.%extension"
A similar template could be specified to access files
on MVS. For example, the following template would access a PDS member that
matches
%basename
:
"dsn:userid.proj4.h(%basename)"
Format 2: The second form of the
set search
command is used to
remove all of the search templates associated with a file-tag.
It specifies a null search list.
Format 3: The question mark (
?
)
character is used to display the search list associated with a file-tag. An asterisk (
*
) can be used as a wildcard character
in place of a specific file-tag argument. Specifying
set search
* ?
will display the search lists for all debugger and source files,
including the cache location, if it was specified with a
set cache
command.
Format 4: The final form of the
set search
subcommand is used to turn tracing on or off. When tracing is
turned
on, the debugger displays a message each time it attempts to open a file,
possibly using a filename generated by a template. The message displays the
name of the file the debugger was looking for and whether or not the search
was successful.
An asterisk (
*
) can be used as a wildcard
character in place of a specific file-tag argument. If an asterisk
is specified for the file-tag, tracing will be affected (either
turned on or turned off) for debug, source, altsource, systeminclude, and
userinclude files.
Release 6.50 of the SAS/C Debugger enhances the
set search
capability introduced in Release 6.00.
In Release 6.00, only one attempt to locate the debugger or source files would
be made. This meant that if the
set search
commands located in the profile were not correct, or had
not been corrected before an attempt to load the source, the current debugging
session would have to continue without access to that particular source.
In Release 6.50, if a
set search
command is issued, followed by a
list
command, the debugger attempts to load any
files that were not
previously found, using the modified
set search
templates. For example, if an attempt to load a source file
fails because the source files have been moved to the dataset SASC.APPL.SOURCE,
issuing the command :
set search source+"dsn:sasc.appl.source(%basename)"
followed by a
list
command causes the debugger to reattempt the search for the source.
The
set
search
issued does not have to directly correlate to the failed search.
For example, a common problem encountered when debugging, is to forget to
allocate the DBGLIB dataset definition. When the debugger fails to locate
the debugger file, a command such as:
system alloc fi(dglib) dsn(appl.dbglib)shr
could be issued to allocate
the DD. A `dummy'
set search
command could then be issued. For example:
set search altsource+""
followed by a
list
command will cause the search to be reattempted.
The
set cache
command is used to specify
a cache location for the debugger file. (In a cross-development environment,
the original debugger file may be located on the host workstation and the
cache location will be on the target mainframe.) A cache location is specified
to provide faster access to debugging information.
The
format for the
set cache
subcommand is
as follows:
Format:
set cache debug =
"template"
Notice that
debug
is the only valid
type of file for the
set cache
subcommand.
set search userinclude = "path:/usr/c/headers/%leafname"
specifies a search list for user include files. When the debugger looks for source code that was included from a user include file located on a host workstation, this template is used to generate a filename and open the file on the workstation.
set search source = "hfs:/home/cxx/src/%leafname"
specifies a search list for source
files in the OS/390 UNIX System Services hierarchical file system (HFS). The
hfs:
filename style prefix instructs the debugger to look for the file
in the HFS file system and open the file if it is found.
set search userinclude + "dsn:userid.c.headers(%basename)"
specifies a template that is appended to the search list for user include
files that was established in the previous example. This template generates
an OS/390
dsn:
style filename that is searched if the user
include file is not found on the workstation.
set search userinclude trace on
turns tracing on for user include files. Whenever the debugger searches for a user include file, a message will be displayed telling you the name of the file searched for and if the search was successful or not.
set search userinclude ?
displays the search template list used to generate filenames for user include file searches.
set search userinclude =
resets the search template list for user include files to null.
set cache debug = "dsn:userid.cache.db(%sname)"
specifies an OS/390 data set used to cache the debugger file on the target mainframe.
set cache debug = "cms:%sname dbg370"
specifies the location of a CMS file used to cache the debugger file on a
target mainframe.
debugger start-up file | yes |
---|---|
command line | yes |
configuration file | no |
Source window prefix | none |
The
set
command is not affected by changes
in scope.
Successful: 0 | |
Unsuccessful: 1 |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.