Chapter Contents

Previous

Next
Compiler Options

debug Option

To use the full functionality of the debugger with your program, you must specify a compiler option that generates hooks in the object code. Hooks are used in order to transfer control to the debugger. Normally, you generate hooks by specifying the debug option at compilation. You can use the dbhook option to generate hooks when you are compiling with the optimize option. Without these hooks, there are only three times in which the debugger can gain control in a function that is compiled without debug:

Library functions are not compiled with debug. Calls to some library functions cannot be trapped.

When you use the debug option, a debugger symbol table file is produced during compilation. See Invoking the Debugger under TSO for information about debugging under TSO, Invoking the Debugger under OS/390 Batch for information about debugging under OS/390 batch, and Invoking the Debugger under CMS for information about debugging under CMS.


debug under TSO and OS/390 batch

The following describes what happens at compile time and debug time when you use the debug option under TSO and OS/390 batch.

Compile time In the compile step, the debugger symbol table file is output to a member of a partitioned data set with the DDname SYSDBLIB, where the member name is the same as the section name that is used by the compiler. See the discussion of sname in sname Option. The data set that is allocated to SYSDBLIB should have a record format U and a block size of 4,080 bytes.

Debug time When you run a program with the debugger under TSO or OS/390 batch, allocate the debugger symbol table file to the DDname DBGLIB. If DBGLIB is not allocated, then you cannot access source code or variable names. If DBGLIB is not allocated when the debugger begins execution, the debugger prompts you for it. Then you type the partitioned data set name of the debugger symbol table file, using standard TSO naming conventions.

If a symbol file table does not exist for your compilation, you receive the following message:

LSCD224 no debug file - your-section-name name not compiled with debug (-d)

Note that use of the debug option suppresses code optimizations and increases the size of the object code for your program. Also, you cannot use the optimize option when you use debug. After you have debugged your program, recompile it (without specifying debug) for the following reasons:


debug under CMS

The symbol table file is output to a file with the same filename as the source file and a filetype of DB.

Note:    If no file is available with filetype DB when the program executes under the debugger, you receive the following message:

LSCD224 no debug file -
your-section-name name not compiled with debug (-d)

  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.