Chapter Contents

Previous

Next
Using Debugger Commands

Command Formats Used with the Debugger

This section explains how formats are used to describe debugger command syntax. It also provides guidelines and constraints that are useful when you invoke the debugger, and a description of the various symbols used in commands.


Formats

Some commands consist of a single word, for example, exit. Others, such as print, can be issued as one word or with one or more arguments. Some command arguments can be nested. Given the possible length and complexity of the commands that are issued to the debugger, syntax descriptions do not show the complete syntax of the command in a single string. Rather, for commands that take many arguments, a separate prototype, or format, is created for each possible configuration of arguments.

For example, the syntax of the print command can appear in the following three formats:

Format 1: print
Format 2: print EXPRESSION
Format 3: print EXPRESSION [(PTYPE)][ %FMT] [COUNT][,EXPRESSION[(PTYPE)] [%FMT][COUNT]]

The following list gives typographical and syntax conventions:

Command Directory shows the entire syntax of a command by presenting a series of formats that illustrate combinations of arguments, from simple to complex.


Guidelines

Command Directory is a detailed reference for all commands and command formats. It illustrates the syntax of debugger commands. The following guidelines apply to all command formats.

Characters

You can use upper- or lowercase characters for debugger commands and keywords. Check with your SAS Installation Representative for SAS/C products to determine if special characters such as braces or brackets have been assigned alternate representations at your location. See Character Set Defaults for Special Characters for more information.

Constant Pointer Specification

Type constant pointers with a leading 0p , such as 0p0001b123 .

Syntax Errors

When you type a command incorrectly (depending on the command and the arguments that you enter with it), the debugger may reject the command, attempt to execute the command, or enable you to reissue the command. Error Handling describes some of these possibilities and the messages that you receive.

Multiple Commands on One Line

You can issue more than one command on a single line. If you do, however, you must separate the commands with semicolons.

If you issue several commands on one line and any one of them has a syntax error, that command and all subsequent commands on the line are rejected. You receive a message, and the debugger prints all the rejected commands.

Command Continuation

In full-screen mode you can use the Log window to type exceptionally long commands. (Debugger commands can be issued from any location inside the border of the Log window.) With the exception of the on command, there is no way to continue a long command in the Command window. You can use a backslash (\) to continue commands across lines. You can split a command and its arguments across lines, provided that the backslash is the last character on the line being continued. The backslash (\) can also be used to continue commands across lines when you are running the debugger in line mode.

Note:    You cannot use the backslash (\) character to continue commands in the Command window. Long CMD-LST arguments to the on command can be continued in the Command window, provided that you type the initial brace before you press the ENTER key. The CMD-LST is continued until the closing brace is entered. Commands in the CMD-LST cannot be split between lines.  [cautionend]

Identical Requests

For the break, trace, and ignore commands, identical requests are uses of the command that apply to the same line range and have the same WHEN clause if there is a WHEN clause. For the on command, identical requests apply to the same line range, have the same WHEN clause (if there is one), and have the same text in the command list. For the monitor command, identical requests monitor the same program element in the same environment.

When you type a request that is identical to an existing request (as defined above), the debugger does not honor the second request, but sends a message. If the existing request is disabled when the identical request is made, the identical request is dropped, and the existing request is silently enabled.

Abbreviations

You can use abbreviations for commands and arguments. The accepted short form (or forms) for each command is listed in Command Directory.

Many keywords can also be abbreviated in debugger commands. The following are a few examples:
a{ll}
c{alls}
e{ntry}
r{eturn}
s{tr}

The characters that precede the braces are the acceptable abbreviations. You can type the abbreviation plus any characters within the braces.


Command Symbols

The command symbols that are described in this section can be typed as part of certain debugger commands. Do not confuse command symbols with similar symbols that are used to describe syntax. The following command symbols have special meanings in the debugger syntax:
; The semicolon separates multiple commands on a single line.
, The comma separates arguments in commands, such as the drop and print commands.
{ } Curly brackets surround commands in an on command.
( ) Parenthesis surround some arguments (such as a section name) in certain commands.
: The colon is used in the following two contexts:

% The percent sign indicates a print output format that is similar to the format specifier string of the printf function, when % is used in the print command and followed by a printf format specification. See print for more information.
\ The backslash is used as an escape symbol. It is used in the print command to escape the modulus operator (%) so that the debugger does not interpret % as a format marker, and in the copy and whatis commands with certain arguments it is used. Also, in line mode or when you are issuing commands from the Log window, you can use the backslash to continue a debugger command to a new line if it is the last character on the line.
* The asterisk requests breakpoints or actions at hooks. See Default PF Key Commands for more information.
- The minus sign indicates a relative direction toward the beginning of your source code. This symbol is used with the list command, and it has a different effect in line mode than it has in full-screen mode.
+ The plus sign indicates a relative direction toward the end of your source code. This symbol is used with the list command, and it has a different effect in line mode than it has in full-screen mode.

Notice that the last three symbols (*, -, and +) are also valid operators in expressions that are used in debugger commands. The way that you use the symbol determines if it is interpreted as a command symbol or an operator. The debugger accepts the operators and symbols that are listed in Operators Supported in Expressions. It also accepts any special characters that are defined for your site. See Character Set Defaults for Special Characters. You also can use the concatenation operator (| |) for brackets [ ] and angle brackets (< >) for { }.


Chapter Contents

Previous

Next

Top of Page

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