AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

SDB ( 1 ) SDB ( 1) by the length specified l, or if no length is given, by the size associated with the variable. If a count specifier is used for the s or a. command, then that many characters are printed. Otherwise successive characters are printed until either a null byte is reached or 128 characters are printed. The last variable may be redisplayed with the command • f. The sh(1) metacharacters • and ? may be used within procedure and variable names, providing a limited form of pattern matching. If no procedure name is given, both variables local to the current procedure and global variables are matched; if a procedure name is specified then only variables local to that procedure are matched. To match only global variables, the form :pattern is used. linenumber?lm variable:?lm Print the value at the address from a..out or I space given by linenumber or variable (procedure name), according to the format lm . The default format is 'i'. variable =lm linenumber=lm number=lm Print the address of variable or linen umber, or the value of number, in the format specified by lm . If no format is given, then lx is used. The last variant of this command provides a convenient way to convert between decimal, octal and hexadecimal. variable !value Set variable to the given value . The value may be a number, character constant or a variable. The value must be well defined; expressions which produce more than one value, such as structures, are not allowed. Character constants are denoted 'character. Numbers are viewed as integers unless a decimal point or exponent is used. In this case, they are treated as having the type double. Registers are viewed as integers. The variable may be an expression which indicates more than one variable, such as an array or structure name. If the address of a variable is given, it is regarded as the address of a variable of type int. C conventions are used in performing any type conversions necessary to perform the indicated assignment. f Print the 68881 floating-point registers. X Print the machine registers and the current machinelanguage instruction. X Print the current machine-language instruction. The commands for examining source files are: e procedure e file-name e directory/ - 4- 1 I

SDB ( 1) SDB ( 1) e directory file-name The first two forms set the current file to the file containing procedure or to file-name . The current line is set to the first line in the named procedure or file. Source files are assumed to be in directory . The default is the current working directory. The latter two forms change the value of directory . If no procedure, file name, or directory is given, the current procedure and file names are reported. I regular expression I Search forward from the current line for a line containing a string matching regular expression as in ed(l). The trailing I may be omitted. ?regular expression? Search backward from the current line for a line containing a string matching regular expression as in ed(l). The trailing ? may be deleted. p Print the current line. z Print the current line followed by the next 9 lines. Set the current line to the last line printed. w Window . Print the 10 lines around the current line. number Set the current line to the given line number. Print the new current line. count+ Advance the current line by count lines. Print the new current line. count- Retreat the current line by count lines. Print the new current line. The commands for controlling the execution of the source program are: count r args count R Run the program with the given arguments. The r command with no arguments reuses the previous arguments to the program while the R command runs the program with no arguments. An argument beginning with < or > causes redirection for the standard input or output, respectively. If count is given, it specifies the number of breakpoints to be ignored. linenumber c count linenumber C count Continue after a breakpoint or interrupt. If count is given, it specifies the number of breakpoints to be ignored. C continues with the signal which caused the program to stop and c ignores it. If a linenumber is specified then a temporary breakpoint is placed at the line and execution is continued. This temporary breakpoint is deleted when the command - 5-

SDB ( 1) SDB ( 1)<br />

e directory file-name<br />

The first two forms set the current file to the file containing<br />

procedure or to file-name . The current line is set to the<br />

first line in the named procedure or file. Source files are<br />

assumed to be in directory . The default is the current<br />

working directory. The latter two forms change the value of<br />

directory . If no procedure, file name, or directory is given,<br />

the current procedure and file names are reported.<br />

I regular expression I<br />

Search forward from the current line for a line containing a<br />

string matching regular expression as in ed(l). The trailing<br />

I may be omitted.<br />

?regular expression?<br />

Search backward from the current line for a line containing<br />

a string matching regular expression as in ed(l). The trailing<br />

? may be deleted.<br />

p Print the current line.<br />

z Print the current line followed by the next 9 lines. Set the<br />

current line to the last line printed.<br />

w Window . Print the 10 lines around the current line.<br />

number<br />

Set the current line to the given line number. Print the new<br />

current line.<br />

count+<br />

Advance the current line by count lines. Print the new<br />

current line.<br />

count-<br />

Retreat the current line by count lines. Print the new<br />

current line.<br />

The commands for controlling the execution of the source program<br />

are:<br />

count r args<br />

count R<br />

Run the program with the given arguments. The r command<br />

with no arguments reuses the previous arguments to<br />

the program while the R command runs the program with<br />

no arguments. An argument beginning with < or > causes<br />

redirection for the standard input or output, respectively. If<br />

count is given, it specifies the number of breakpoints to be<br />

ignored.<br />

linenumber c count<br />

linenumber C count<br />

Continue after a breakpoint or interrupt. If count is given,<br />

it specifies the number of breakpoints to be ignored. C continues<br />

with the signal which caused the program to stop and<br />

c ignores it. If a linenumber is specified then a temporary<br />

breakpoint is placed at the line and execution is continued.<br />

This temporary breakpoint is deleted when the command<br />

- 5-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!