Chapter Contents |
Previous |
Next |
Running the Debugger under CMS |
This chapter provides specific instructions for running the SAS/C Debugger under CMS. See also Quick Start to Using the Debugger for more general information.
Compiling Your Source Files |
Compile each program module that you want to debug with the
debug
compiler option.
LC370 filename <.filetype<.filemode>> <(options<)> >
LC370 ddn:ddname <(member)> <(options<)> >
filename
<filetype
<dirname
>
<(options
<)> >sf:
format
specifies a Shared File System (SFS) fileid. Like the first format, filename is used to specify the source file, and filetype defaults to C.
The SFS directory name is specified
by dirname, which defaults to a period and selects
your home directory. If you choose to specify a dirname, it can be associated
with a filemode, in which case the sf:
format
functions exactly like the first format shown above. It is also possible
to assign a logical name, NAMEDEF, to a dirname. NAMEDEFs can be used interchangeably
with dirnames.
When you compile a program with debug
, a
debugger symbol table file is produced. This file
outputs to a file with the same filename as the source file and a filetype
of DB. The compiler writes its output files (LISTING, TEXT, and debugger
symbol table) to different places depending on the command that you issue
in order to invoke the LC370 EXEC.
When using an SFS fileid, you must set the _DB environment variable before you invoke the debugger. The _DB environment variable contains a directory list, and the debugger searches it for the debugger table file. Instructions for setting the _DB variable are provided in Invoking the Debugger under CMS.
You can
compile your program with the sname
option as well as the debug
option. The
sname
option is useful if you plan to specify the SECTION-NAME argument in debugger
commands and do not want to determine the default section name. debug Option and
sname Option describe
the debug
and sname
options. See the SAS/C Compiler and Library User's Guide for additional
information.
Linking Your Programs |
Invoking the Debugger under CMS |
Invoke the debugger by using the following command:
program-name =d <parameters>
program-name is the filename
of the MODULE that you want to debug, and parameters
are any optional values, such as redirections, run-time options, or values
that you want to pass to the program (for example, argv
, argc
[
] ).
GLOBALV SELECT LC370 SETL _DB directory-list
GLOBALV SELECT LC370 SETL _DB .C.PROJ1 .C.PROJ2
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.