![]() Chapter Contents |
![]() Previous |
![]() Next |
SAS/C Software: Changes and Enhancements, Release 6.50 |
The SAS/C Debugger now implements line number breakpoints for functions that are located in an include file. This enables you to use line numbers as the hook-type command argument to specify a breakpoint in a function that is in an include file and not the primary file. The following commands are affected by this change:
break |
goto |
resume |
disable |
ignore |
runto |
drop |
on |
trace |
enable |
query |
Prior to Release 5.50, the debugger supported a variety of hooks whose hook-type arguments were the line numbers of the compilation. When using these arguments, you interacted with the debugger in terms of these compilation or primary file line numbers. If a function was in an include file, all lines of the function corresponded to the same primary file line; the granularity provided by the existing mechanism was not fine enough to set a breakpoint on a particular line of the function in the included file.
With Release 5.50, this behavior has changed: line numbers specified as hook-type arguments now correspond to the line numbers of the file that contains the function. For functions that are in the primary file of the compilation, you can set breakpoints as before. For functions in include files, the line numbers used are the actual line numbers of the included file that contains the function and not the line numbers of the primary file. When the debugger stops in such an include file, the source for the include file is displayed in the Source window, and the line numbers displayed are those of the included file. This behavior is supported only if the entire function is in one included file, which is normally the case.
Breakpoints by compilation name work as before. For example, the following
break
command format sets breakpoints at all hooks in the primary file specified by the section-name
argument that are on the line specified by the line-num argument.
break
(section-name) line-num
If that line contains an include file
with code, the debugger stops at all line-hooks in that include file, as well as any other files that are included.
Under MVS, to display source code in system include files, the DDname DBGSLIB must be allocated to the partitioned data sets
containing the include files. For user include files, the same allocations issued at compiler time are required. For instance, if the program specified
#include "decl.h"
, the DDname H must be allocated during debugging to the same PDS as at compile
time.
Prefix-area commands, which are entered in the prefix area of the Source window, work with include files.
With Release 5.50, the SAS/C Debugger verifies that there are
line-hooks at the location specified by the following formats of the
break
command:
break
function-name line-num
break
function-name line-num1 :line-num2
The verification of line-hooks affects the debugger in the following ways:
for
loop with a non-null body is not contiguous. After the code for the initialization and the code for the test, the
code for the loop body appears, and only then does the code for the increment portion of the loop appear. Therefore,
if the entire loop header appears on one line, setting a breakpoint on that line does not cause the debugger to break before the increment portion.
The line numbers
displayed in the output of the
where
command are primary file line numbers. Similarly, the line numbers returned by the
transfer
command are also primary file line numbers.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © Mon Mar 9 09:11:22 EST 1998 by SAS Institute Inc., Cary, NC, USA. All rights reserved.