BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / pdx.0
PDX(1) UNIX Programmer's Manual PDX(1)
N\bNA\bAM\bME\bE
pdx - pascal debugger
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
pdx [-\b-r\br] [_\bo_\bb_\bj_\bf_\bi_\bl_\be]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bP_\bd_\bx is a tool for source level debugging and execution of
Pascal programs. The _\bo_\bb_\bj_\bf_\bi_\bl_\be is an object file produced by
the Pascal translator _\bp_\bi(1). If no _\bo_\bb_\bj_\bf_\bi_\bl_\be is specified,
_\bp_\bd_\bx looks for a file named ``obj'' in the current directory.
The object file contains a symbol table which includes the
name of the all the source files translated by _\bp_\bi to create
it. These files are available for perusal while using the
debugger.
If the file ``.pdxinit'' exists in the current directory,
then the debugger commands in it are executed.
The -\b-r\br option causes the _\bo_\bb_\bj_\bf_\bi_\bl_\be to be executed immediately;
if it terminates successfully _\bp_\bd_\bx exits. Otherwise it
reports the reason for termination and offers the user the
option of entering the debugger or simply letting _\bp_\bx con-
tinue with a traceback. If -\b-r\br is not specified, _\bp_\bd_\bx just
prompts and waits for a command.
The commands are:
r\bru\bun\bn [_\ba_\br_\bg_\bs] [<\b< _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [>\b> _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
Start executing _\bo_\bb_\bj_\bf_\bi_\bl_\be, passing _\ba_\br_\bg_\bs as command line
arguments; <\b< or >\b> can be used to redirect input or out-
put in the usual manner.
t\btr\bra\bac\bce\be [i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
t\btr\bra\bac\bce\be _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
t\btr\bra\bac\bce\be _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn [i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
t\btr\bra\bac\bce\be _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn a\bat\bt _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
t\btr\bra\bac\bce\be _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be [i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
Have tracing information printed when the program is
executed. A number is associated with the command that
is used to turn the tracing off (see the d\bde\bel\ble\bet\bte\be com-
mand).
The first argument describes what is to be traced. If
it is a _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br, then the line is printed
immediately prior to being executed. Source line
numbers in a file other than the current one must be
preceded by the name of the file and a colon, e.g.
``mumble.p:17''.
If the argument is a procedure or function name then
every time it is called, information is printed telling
Printed 7/9/88 April 29, 1985 1
PDX(1) UNIX Programmer's Manual PDX(1)
what routine called it, from what source line it was
called, and what parameters were passed to it. In
addition, its return is noted, and if it's a function
then the value it is returning is also printed.
If the argument is an _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn with an a\bat\bt clause then
the value of the expression is printed whenever the
identified source line is reached.
If the argument is a variable then the name and value
of the variable is printed whenever it changes. Execu-
tion is substantially slower during this form of trac-
ing.
If no argument is specified then all source lines are
printed before they are executed. Execution is sub-
stantially slower during this form of tracing.
The clause ``i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn'' restricts tracing
information to be printed only while executing inside
the given procedure or function.
_\bC_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn is a Pascal boolean expression and is
evaluated prior to printing the tracing information; if
it is false then the information is not printed.
There is no restriction on the amount of information
that can be traced.
s\bst\bto\bop\bp i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn
s\bst\bto\bop\bp a\bat\bt _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
s\bst\bto\bop\bp i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
s\bst\bto\bop\bp _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
Stop execution when the given line is reached, pro-
cedure or function called, variable changed, or condi-
tion true.
d\bde\bel\ble\bet\bte\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd-_\bn_\bu_\bm_\bb_\be_\br
The trace or stop corresponding to the given number is
removed. The numbers associated with traces and stops
are printed by the s\bst\bta\bat\btu\bus\bs command.
s\bst\bta\bat\btu\bus\bs [>\b> _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
Print out the currently active t\btr\bra\bac\bce\be and s\bst\bto\bop\bp commands.
c\bco\bon\bnt\bt Continue execution from where it stopped. This can
only be done when the program was stopped by an inter-
rupt or through use of the s\bst\bto\bop\bp command.
s\bst\bte\bep\bp Execute one source line.
n\bne\bex\bxt\bt Execute up to the next source line. The difference
Printed 7/9/88 April 29, 1985 2
PDX(1) UNIX Programmer's Manual PDX(1)
between this and s\bst\bte\bep\bp is that if the line contains a
call to a procedure or function the s\bst\bte\bep\bp command will
stop at the beginning of that block, while the n\bne\bex\bxt\bt
command will not.
p\bpr\bri\bin\bnt\bt _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn [,\b, _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn ...]
Print out the values of the Pascal expressions. Vari-
ables declared in an outer block but having the same
identifier as one in the current block may be refer-
enced as ``_\bb_\bl_\bo_\bc_\bk-_\bn_\ba_\bm_\be .\b. _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be''.
w\bwh\bha\bat\bti\bis\bs _\bi_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br
Print the declaration of the given identifier.
w\bwh\bhi\bic\bch\bh _\bi_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br
Print the full qualification of the given identifer,
i.e. the outer blocks that the identifier is associ-
ated with.
a\bas\bss\bsi\big\bgn\bn _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn
Assign the value of the expression to the variable.
c\bca\bal\bll\bl _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be(_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br_\bs)
Execute the object code associated with the named pro-
cedure or function.
h\bhe\bel\blp\bp Print out a synopsis of _\bp_\bd_\bx commands.
g\bgr\bri\bip\bpe\be
Invokes a mail program to send a message to the person
in charge of _\bp_\bd_\bx.
w\bwh\bhe\ber\bre\be
Print out a list of the active procedures and functions
and the respective source line where they are called.
s\bso\bou\bur\brc\bce\be _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
Read _\bp_\bd_\bx commands from the given _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. Especially
useful when the _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be has been created by redirect-
ing a s\bst\bta\bat\btu\bus\bs command from an earlier debugging session.
d\bdu\bum\bmp\bp [>\b> _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
Print the names and values of all active data.
l\bli\bis\bst\bt [_\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br [,\b, _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br]]
l\bli\bis\bst\bt _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
List the lines in the current source file from the
first line number to the second inclusive. As in the
editor ``$'' can be used to refer to the last line. If
no lines are specified, the entire file is listed. If
the name of a procedure or function is given lines _\bn-_\bk
to _\bn+_\bk are listed where _\bn is the first statement in the
Printed 7/9/88 April 29, 1985 3
PDX(1) UNIX Programmer's Manual PDX(1)
procedure or function and _\bk is small.
f\bfi\bil\ble\be [_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
Change the current source file name to _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. If
none is specified then the current source file name is
printed.
e\bed\bdi\bit\bt [_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
e\bed\bdi\bit\bt _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn-_\bn_\ba_\bm_\be
Invoke an editor on _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be or the current source file
if none is specified. If a _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be or _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn name
is specified, the editor is invoked on the file that
contains it. Which editor is invoked by default
depends on the installation. The default can be over-
ridden by setting the environment variable EDITOR to
the name of the desired editor.
p\bpi\bi Recompile the program and read in the new symbol table
information.
s\bsh\bh _\bc_\bo_\bm_\bm_\ba_\bn_\bd-_\bl_\bi_\bn_\be
Pass the command line to the shell for execution. The
SHELL environment variable determines which shell is
used.
a\bal\bli\bia\bas\bs _\bn_\be_\bw-_\bc_\bo_\bm_\bm_\ba_\bn_\bd-_\bn_\ba_\bm_\be _\bo_\bl_\bd-_\bc_\bo_\bm_\bm_\ba_\bn_\bd-_\bn_\ba_\bm_\be
This command makes _\bp_\bd_\bx respond to _\bn_\be_\bw-_\bc_\bo_\bm_\bm_\ba_\bn_\bd-_\bn_\ba_\bm_\be the
way it used to respond to _\bo_\bl_\bd-_\bc_\bo_\bm_\bm_\ba_\bn_\bd-_\bn_\ba_\bm_\be.
q\bqu\bui\bit\bt Exit _\bp_\bd_\bx.
The following commands deal with the program at the _\bp_\bx
instruction level rather than source level. They are not
intended for general use.
t\btr\bra\bac\bce\bei\bi [_\ba_\bd_\bd_\br_\be_\bs_\bs] [i\bif\bf _\bc_\bo_\bn_\bd]
t\btr\bra\bac\bce\bei\bi [_\bv_\ba_\br_\bi_\ba_\bb_\bl_\be] [a\bat\bt _\ba_\bd_\bd_\br_\be_\bs_\bs] [i\bif\bf _\bc_\bo_\bn_\bd]
s\bst\bto\bop\bpi\bi [_\ba_\bd_\bd_\br_\be_\bs_\bs] [i\bif\bf _\bc_\bo_\bn_\bd]
s\bst\bto\bop\bpi\bi [a\bat\bt] [_\ba_\bd_\bd_\br_\be_\bs_\bs] [i\bif\bf _\bc_\bo_\bn_\bd]
Turn on tracing or set a stop using a _\bp_\bx machine
instruction addresses.
x\bxi\bi _\ba_\bd_\bd_\br_\be_\bs_\bs [,\b, _\ba_\bd_\bd_\br_\be_\bs_\bs]
Print the instructions starting at the first _\ba_\bd_\bd_\br_\be_\bs_\bs.
Instructions up to the second _\ba_\bd_\bd_\br_\be_\bs_\bs are printed.
x\bxd\bd _\ba_\bd_\bd_\br_\be_\bs_\bs [,\b, _\ba_\bd_\bd_\br_\be_\bs_\bs]
Print in octal the specified data location(s).
Printed 7/9/88 April 29, 1985 4
PDX(1) UNIX Programmer's Manual PDX(1)
F\bFI\bIL\bLE\bES\bS
obj Pascal object file
.pdxinit _\bP_\bd_\bx initialization file
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
pi(1), px(1)
_\bA_\bn _\bI_\bn_\bt_\br_\bo_\bd_\bu_\bc_\bt_\bi_\bo_\bn _\bt_\bo _\bP_\bd_\bx
B\bBU\bUG\bGS\bS
_\bP_\bd_\bx does not understand sets, and provides no information
about files.
The _\bw_\bh_\ba_\bt_\bi_\bs command doesn't quite work for variant records.
Bad things will happen if a procedure invoked with the c\bca\bal\bll\bl
command does a non-local goto.
The commands s\bst\bte\bep\bp and n\bne\bex\bxt\bt should be able to take a _\bc_\bo_\bu_\bn_\bt
that specifies how many lines to execute.
There should be commands s\bst\bte\bep\bpi\bi and n\bne\bex\bxt\bti\bi that correspond to
s\bst\bte\bep\bp and n\bne\bex\bxt\bt but work at the instruction level.
There should be a way to get an address associated with a
line number, procedure or function, and variable.
Most of the command names are too long.
The alias facility is quite weak.
A _\bc_\bs_\bh-like history capability would improve the situation.
Printed 7/9/88 April 29, 1985 5