SCCS-vsn: usr.bin/pascal/pdx/pdx.1 6.4
.\" Copyright (c) 1983, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Copyright (c) 1983, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
-.\" %sccs.include.redist.man%
+.\" %sccs.include.redist.roff%
-.\" @(#)pdx.1 6.3 (Berkeley) %G%
+.\" @(#)pdx.1 6.4 (Berkeley) %G%
.Dd
.Dt PDX 1
.Os BSD 4.2
.Dd
.Dt PDX 1
.Os BSD 4.2
exists in the current directory, then the
debugger commands in it are executed.
.Pp
exists in the current directory, then the
debugger commands in it are executed.
.Pp
+.Bl -tag -width flag r
+.It Fl r
The
.Fl r
option causes the
The
.Fl r
option causes the
is not specified,
.Nm pdx
just prompts and waits for a command.
is not specified,
.Nm pdx
just prompts and waits for a command.
-.Dw Fl
-.Di L
-.Dp Cx Ic run
-.Cx \&\ \&
+.Pp
+.Bl -tag -width flag -compact
+.It Xo
+.Ic run
Start executing
.Ar objfile ,
passing
Start executing
.Ar objfile ,
passing
.Ic \&>
can be used to redirect input or output in the usual manner.
.Pp
.Ic \&>
can be used to redirect input or output in the usual manner.
.Pp
-.Dp Cx Ic trace
-.Pp
-.Cx \&\ \&
.Op Ic in Ar procedure/function
.Op Ic in Ar procedure/function
-.Cx \&\ \&
-.Op Ic if Ar condition
-.Cx
-.Dp Cx Ic trace
-.Cx \&\ \&
+.Op Ic if Ar condition
+.Xc
+.It Xo
+.Ic trace
.Ar source-line-number
.Op Ic if Ar condition
.Ar source-line-number
.Op Ic if Ar condition
-.Cx \&\ \&
-.Cx
-.Dp Cx Ic trace
-.Cx \&\ \&
.Op Ic in Ar procedure/function
.Op Ic in Ar procedure/function
-.Cx \&\ \&
-.Op Ic if Ar condition
-.Cx
-.Dp Cx Ic trace
-.Cx \&\ \&
-.Ar expression
-.Cx \&\ \&
-.Ic at
-.Cx \&\ \&
-.Ar source-line-number
-.Cx \&\ \&
-.Op Ic if Ar condition
-.Cx
-.Dp Cx Ic trace
-.Cx \&\ \&
+.Op Ic if Ar condition
+.Xc
+.It Xo
+.Ic trace
+.Ar expression Ic at Ar source-line-number
+.Op Ic if Ar condition
+.Xc
+.It Xo
+.Ic trace
.Op Ic in Ar procedure/function
.Op Ic in Ar procedure/function
-.Cx \&\ \&
-.Op Ic if Ar condition
-.Cx
+.Op Ic if Ar condition
+.Xc
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
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
Execution is substantially slower during this form of tracing.
.Pp
The clause
Execution is substantially slower during this form of tracing.
.Pp
The clause
-.Dq Cx Ic in
-.Cx \&\ \&
-.Ar procedure/function
-.Cx
+.Dq Ic in Ar procedure/function
restricts tracing information
to be printed only while executing inside the given procedure
or function.
restricts tracing information
to be printed only while executing inside the given procedure
or function.
that can be traced.
.Pp
.ne 10
that can be traced.
.Pp
.ne 10
-.Dp Cx Ic stop
-.Cx \&\ \&
-.Ic if
-.Cx \&\ \&
-.Ar condition
-.Cx
-.Dp Cx Ic stop
-.Cx \&\ \&
-.Ic at
-.Cx \&\ \&
-.Ar source-line-number
-.Cx \&\ \&
-.Op Ic if Ar condition
-.Cx
-.Dp Cx Ic stop
-.Cx \&\ \&
-.Ic in
-.Cx \&\ \&
-.Ar procedure /function
-.Cx \&\ \&
-.Op Ic if Ar condition
-.Cx
-.Dp Cx Ic stop
-.Cx \&\ \&
-.Ar variable
-.Cx \&\ \&
-.Op Ic if Ar condition
-.Cx
+.It Ic stop if Ar condition
+.It Xo
+.Ic stop at Ar source-line-number
+.Op Ic if Ar condition
+.Xc
+.It Xo
+.Ic stop in Ar procedure/function
+.Op Ic if Ar condition
+.Xc
+.It Xo
+.Ic stop Ar variable
+.Op Ic if Ar condition
+.Xc
Stop execution when the given line is reached, procedure or function
called, variable changed, or condition true.
.Pp
Stop execution when the given line is reached, procedure or function
called, variable changed, or condition true.
.Pp
-.Dp Cx Ic delete
-.Cx \&\ \&
-.Ar command-number
-.Cx
+.It Ic delete Ar command-number
The trace or stop corresponding to the given number is removed.
The numbers associated with traces and stops are printed by
the
.Ic status
command.
.Pp
The trace or stop corresponding to the given number is removed.
The numbers associated with traces and stops are printed by
the
.Ic status
command.
.Pp
-.Dp Cx Ic status
-.Cx \&\ \&
-.Op Ic \&> Ar filename
-.Cx
+.It Ic status Op Ic \&> Ar filename
Print out
the currently active
.Ic trace
Print out
the currently active
.Ic trace
Continue execution from where it stopped.
This can only be
done when the program was stopped by an interrupt
Continue execution from where it stopped.
This can only be
done when the program was stopped by an interrupt
Execute one source line.
.Pp
Execute one source line.
.Pp
Execute up to the next source line.
The difference between this and
.Ic step
Execute up to the next source line.
The difference between this and
.Ic step
.Ic next
command will not.
.Pp
.Ic next
command will not.
.Pp
-.Dp Cx Ic print
-.Cx \&\ \&
-.Ar expression
-.Cx \&\ \&
-.Op Ic \&, Ar expression ...
-.Cx
+.It Xo
+.Ic print Ar expression
+.Op Ic \&, Ar expression ...
+.Xc
Print out the values of the Pascal expressions.
Variables declared in an outer block but having
the same identifier as one in the current block may be
referenced as
.Dq Ar block-name \&. variable
.Pp
Print out the values of the Pascal expressions.
Variables declared in an outer block but having
the same identifier as one in the current block may be
referenced as
.Dq Ar block-name \&. variable
.Pp
-.Dp Cx Ic whatis
-.Cx \&\ \&
-.Ar identifier
-.Cx
+.It Ic whatis Ar identifier
Print the declaration of the given identifier.
.Pp
Print the declaration of the given identifier.
.Pp
-.Dp Cx Ic which
-.Cx \&\ \&
-.Ar identifier
-.Cx
+.It Ic which Ar identifier
Print the full qualification of the given identifer, i.e.
the outer blocks that the identifier is associated with.
.Pp
Print the full qualification of the given identifer, i.e.
the outer blocks that the identifier is associated with.
.Pp
-.Dp Cx Ic assign
-.Cx \&\ \&
-.Ar variable
-.Cx \&\ \&
-.Ar expression
-.Cx
+.It Ic assign Ar variable Ar expression
Assign the value of the expression to the variable.
.Pp
Assign the value of the expression to the variable.
.Pp
-.Dp Cx Ic call
-.Cx \&\ \&
-.Ar procedure (parameters)
-.Cx
+.It Ic call Ar procedure Ns (parameters)
Execute the object code associated with the named procedure or function.
.Pp
Execute the object code associated with the named procedure or function.
.Pp
Print out a synopsis of
.Nm pdx
commands.
.Pp
Print out a synopsis of
.Nm pdx
commands.
.Pp
Invokes a mail program to send a message to the person in charge of
.Nm pdx .
.Pp
Invokes a mail program to send a message to the person in charge of
.Nm pdx .
.Pp
Print out
a list of the active procedures and functions and the respective source
line where they are called.
.Pp
Print out
a list of the active procedures and functions and the respective source
line where they are called.
.Pp
-.Dp Cx Ic source
-.Cx \&\ \&
-.Ar filename
-.Cx
+.It Ic source Ar filename
Read
.Nm pdx
commands from the given
Read
.Nm pdx
commands from the given
.Ic status
command from an earlier debugging session.
.Pp
.Ic status
command from an earlier debugging session.
.Pp
-.Dp Cx Ic dump
-.Cx \&\ \&
-.Op Ic \&> Ar filename
-.Cx
+.It Ic dump Op Ic \&> Ar filename
Print the names and values of all active
data.
.Pp
Print the names and values of all active
data.
.Pp
-.Dp Cx Ic list
-.Cx \&\ \&[
-.Ar source-line-number
-.Cx \&\ \&
-.Op \&, Ar source-line-number
-.Cx \&]
-.Cx
-.Dp Cx Ic list
-.Cx \&\ \&
-.Ar procedure/function
-.Cx
+.It Xo
+.Ic list
+.Oo Ar source-line-number
+.Op \&, Ar source-line-number Oc
+.Xc
+.It Ic list Ar procedure/function
List the lines in the current source file from the first line number to
the second inclusive.
As in the editor
List the lines in the current source file from the first line number to
the second inclusive.
As in the editor
-.Dp Cx Ic file
-.Cx \&\ \&
-.Op Ar filename
-.Cx
+.It Ic file Op Ar filename
Change the current source file name to
.Ar filename .
If none is specified then the current source file name is printed.
.Pp
Change the current source file name to
.Ar filename .
If none is specified then the current source file name is printed.
.Pp
-.Dp Cx Ic edit
-.Cx \&\ \&
-.Op Ar filename
-.Cx
-.Dp Cx Ic edit
-.Cx \&\ \&
-.Ar procedure/function-name
-.Cx
+.It Ic edit Op Ar filename
+.It Ic edit Ar procedure Ns / Ns Ar function-name
Invoke an editor on
.Ar filename
or the current source file if none
Invoke an editor on
.Ar filename
or the current source file if none
the editor is invoked on the file that contains it.
Which editor is invoked by default depends on the installation.
The default can be overridden by setting the environment variable
the editor is invoked on the file that contains it.
Which editor is invoked by default depends on the installation.
The default can be overridden by setting the environment variable
-EDITOR to the name of the desired editor.
+.Ev EDITOR
+to the name of the desired editor.
Recompile the program and read in the new symbol table information.
.Pp
Recompile the program and read in the new symbol table information.
.Pp
-.Dp Cx Ic sh
-.Cx \&\ \&
-.Ar command-line
-.Cx
+.It Ic sh Ar command-line
Pass the command line to the shell for execution.
The SHELL environment variable determines which shell is used.
.Pp
Pass the command line to the shell for execution.
The SHELL environment variable determines which shell is used.
.Pp
-.Dp Cx Ic alias
-.Cx \&\ \&
-.Ar new-command-name
-.Cx \&\ \&
-.Ar old-command-name
-.Cx
+.It Ic alias Ar new-command-name Ar old-command-name
This command makes
.Nm pdx
respond to
This command makes
.Nm pdx
respond to
the way it used to respond to
.Ar old-command-name .
.Pp
the way it used to respond to
.Ar old-command-name .
.Pp
.Pp
The following commands deal with the program at the
.Ar px
instruction
level rather than source level.
They are not intended for general use.
.Pp
The following commands deal with the program at the
.Ar px
instruction
level rather than source level.
They are not intended for general use.
-.Dw Fl
-.Di L
-.Dp Cx Ic tracei
-.Cx \&\ \&
+.Pp
+.Bl -tag -width Fl -compact
+.It Xo
+.Ic tracei
-.Cx \&\ \&
-.Op Ic if Ar cond
-.Cx
-.Dp Cx Ic tracei
-.Cx \&\ \&
+.Op Ic if Ar cond
+.Xc
+.It Xo
+.Ic tracei
-.Cx \&\ \&
-.Op Ic if Ar cond
-.Cx
-.Dp Cx Ic stopi
-.Cx \&\ \&
+.Op Ic if Ar cond
+.Xc
+.It Xo
+.Ic stopi
-.Cx \&\ \&
-.Op Ic if Ar cond
-.Cx
-.Dp Cx Ic stopi
-.Cx \&\ \&
+.Op Ic if Ar cond
+.Xc
+.It Xo
+.Ic stopi
-.Cx \&\ \&
-.Op Ic if Ar cond
-.Cx
Turn on tracing or set a stop using a
.Ic px
machine
instruction addresses.
.Pp
Turn on tracing or set a stop using a
.Ic px
machine
instruction addresses.
.Pp
-.Dp Cx Ic xi
-.Cx \&\ \&
-.Ar address
-.Cx \&\ \&
-.Op Ic \&, Ar address
-.Cx
+.It Xo
+.Ic xi Ar address
+.Op Ic \&, Ar address
+.Xc
Print the instructions starting at the first
.Ar address .
Instructions up to
Print the instructions starting at the first
.Ar address .
Instructions up to
.Ar address
are printed.
.Pp
.Ar address
are printed.
.Pp
-.Dp Cx Ic xd
-.Cx \&\ \&
-.Ar address
-.Cx \&\ \&
-.Op Ic \&, Ar address
-.Cx
+.It Xo
+.Ic xd Ar address
+.Op Ic \&, Ar address
+.Xc
Print in octal the specified data location(s).
Print in octal the specified data location(s).
+.Bl -tag -width Ar
+.It Ev EDITOR
The
.Ic edit
function uses the
.Ev EDITOR
environment variable to see what editor to use.
The
.Ic edit
function uses the
.Ev EDITOR
environment variable to see what editor to use.
The function
.Ic sh
checks the
.Ev SHELL
variable to see which shell to
execute.
The function
.Ic sh
checks the
.Ev SHELL
variable to see which shell to
execute.
-.Dw .pdxinit
-.Di L
-.Dp Pa \&obj
+.Bl -tag -width .pdxinit -compact
+.It Pa obj
.Nm Pdx
initialization file
.Nm Pdx
initialization file
.Sh SEE ALSO
.Xr pi 1 ,
.Xr px 1
.Sh SEE ALSO
.Xr pi 1 ,
.Xr px 1
-.br
-.Em Ar An Introduction to Pdx
+.Rs
+.%T "An Introduction to Pdx"
+.Re
.Sh BUGS
.Nm Pdx
does not understand sets,
.Sh BUGS
.Nm Pdx
does not understand sets,
The alias facility is quite weak.
.Pp
A
The alias facility is quite weak.
.Pp
A
-.Xr csh 1
-\- like history capability would improve the situation.
+.Xr csh 1 Ns \-like
+history capability would improve the situation.