pdx.1

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1 代码 · 共 296 行

1
296
字号
.\" SCCSID: @(#)pdx.1	8.1	9/11/90.TH pdx 1 VAX.SH Namepdx \- pascal debugger.SH Syntaxpdx [\fB\-r\fR] [\|\fIobjfile\fR\|].SH Description.NXR "pdx debugger".NXR "Pascal program" "debugging".NXA "pc compiler" "pdx debugger".NXA "pdx debugger" "pi code translator"The.PN pdxcommand is a tool for source level debugging and execution ofPascal programs.The \fIobjfile\fP is an object file produced by the Pascal translator.MS pi 1 .If no \fIobjfile\fP is specified, .PN pdxlooksfor a file named ``obj'' in the current directory.The object file contains a symbol table which includes the name of theall the source files translated by .PN pito create it.These files are available for perusal while using the debugger..PPIf the file .pdxinit exists in the current directory, then thedebugger commands in it are executed..PPThe \fB\-r\fP option causesthe \fIobjfile\fP to be executed immediately;if it terminates successfully .PN pdxexits.Otherwise it reports the reason for terminationand offers the user the option of entering the debuggeror simply letting .PN pxcontinue with a traceback.If \fB\-r\fP is not specified, .PN pdxjust promptsand waits for a command..PPThe commands are:.TP\fBrun\fP [\fIargs\fP] [\fB<\fP \fIfilename\fP] [\fB>\fP \fIfilename\fP].NXR "run command (pdx)"Start executing \fIobjfile\fP, passing \fIargs\fP as command line arguments;\fB<\fP or \fB>\fP can be usedto redirect input or output in the usual manner..TP\fBtrace\fP [\fBin\fP \fIprocedure/function\fP] [\fBif\fP \fIcondition\fP].ns.TP\fBtrace\fP \fIsource-line-number\fP [\fBif\fP \fIcondition\fP].ns.TP\fBtrace\fP \fIprocedure/function\fP [\fBin\fP \fIprocedure/function\fP] [\fBif\fP \fIcondition\fP].ns.TP\fBtrace\fP \fIexpression\fP \fBat\fP \fIsource-line-number\fP [\fBif\fP \fIcondition\fP].ns.TP\fBtrace\fP \fIvariable\fP [\fBin\fP \fIprocedure/function\fP] [\fBif\fP \fIcondition\fP].NXR "trace command (pdx)"Have tracing information printed when the program is executed.A number is associated with the command that is usedto turn the tracing off (see the \fBdelete\fP command)..sp 1The first argument describes what is to be traced.If it is a \fIsource-line-number\fP, then the line is printedimmediately prior to being executed.Source line numbers in a file other than the current onemust be preceded by the name of the file and a colon, for example,``mumble.p:17''..sp 1If the argument is a procedure or function name thenevery time it is called, information is printed tellingwhat 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 functionthen the value it is returning is also printed..sp 1If the argument is an \fIexpression\fP with an \fBat\fP clausethen the value of the expression is printed whenever theidentified source line is reached..sp 1If the argument is a variable then the name and value of the variableis printed whenever it changes.Execution is substantially slower during this form of tracing..sp 1If no argument is specified then all source lines are printedbefore they are executed.Execution is substantially slower during this form of tracing..sp 1The clause ``\fBin\fP \fIprocedure/function\fP'' restricts tracing informationto be printed only while executing inside the given procedureor function..sp 1\fICondition\fP is a Pascal boolean expression and isevaluated prior to printing the tracing information;if it is false then the information is not printed..sp 1There is no restriction on the amount of informationthat can be traced..br.ne 10.IP "\fBstop\fP \fBif\fP \fIcondition\fP".ns.IP "\fBstop\fP \fBat\fP \fIsource-line-number\fP [\fBif\fP \fIcondition\fP]".ns.IP "\fBstop\fP \fBin\fP \fIprocedure/function\fP [\fBif\fP \fIcondition\fP]".ns.IP "\fBstop\fP \fIvariable\fP [\fBif\fP \fIcondition\fP]".NXR "stop command (pdx)"Stop execution when the given line is reached, procedure or functioncalled, variable changed, or condition true..IP "\fBdelete\fP \fIcommand-number\fP".NXR "delete command (pdx)"The trace or stop corresponding to the given number is removed.The numbers associated with traces and stops are printed bythe \fBstatus\fP command..IP "\fBstatus\fP [\fB>\fP \fIfilename\fP]".NXR "status command (pdx)"Print outthe currently active \fBtrace\fP and \fBstop\fP commands..IP \fBcont\fP.NXR "cont command (pdx)"Continue execution from where it stopped.This can only bedone when the program was stopped by an interruptor through use of the \fBstop\fP command..IP \fBstep\fP.NXR "step command (pdx)"Execute one source line..IP \fBnext\fP.NXR "next command (pdx)"Execute up to the next source line.The difference between this and \fBstep\fP is thatif the line contains a call to a procedure or functionthe \fBstep\fP command will stop at the beginning of thatblock, while the \fBnext\fP command will not..IP "\fBprint\fP \fIexpression\fP [\fB,\fP \fIexpression\fP ...]".NXR "print command (pdx)"Print out the values of the Pascal expressions.Variables declared in an outer block but havingthe same identifier as one in the current block may bereferenced as ``\fIblock-name\fP\ \fB.\fP\ \fIvariable\fP''..IP "\fBwhatis\fP \fIidentifier\fP".NXR "whatis command (pdx)"Print the declaration of the given identifier..IP "\fBwhich\fP \fIidentifier\fP".NXR "which command (pdx)"Print the full qualification of the given identifier, that isthe outer blocks that the identifier is associated with..IP "\fBassign\fP \fIvariable\fP \fIexpression\fP".NXR "assign command (pdx)"Assign the value of the expression to the variable..IP "\fBcall\fP \fIprocedure(parameters)\fP".NXR "call command (pdx)"Execute the object code associated with the named procedure or function..IP \fBhelp\fP.NXR "help command (pdx)"Print out a synopsis of .PN pdxcommands..IP \fBgripe\fP.NXR "gripe command (pdx)"Invokes a mail program to send a message to the person in charge of .PN pdx ..IP \fBwhere\fP.NXR "where command (pdx)"Print outa list of the active procedures and functions and the respective sourceline where they are called..TP\fBsource\fP \fIfilename\fP.NXR "source command (pdx)"Read .PN pdxcommands from the given \fIfilename\fP.Especially useful when the \fIfilename\fP has been created by redirectinga \fBstatus\fP command from an earlier debugging session..IP "\fBdump\fP [\fB>\fP \fIfilename\fP]".NXR "dump command (pdx)"Print the names and values of all activedata..IP "\fBlist\fP [\fIsource-line-number\fP [\fB,\fP \fIsource-line-number\fP]]".ns.IP "\fBlist\fP \fIprocedure/function\fP".NXR "list command (pdx)"List the lines in the current source file from the first line number tothe 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 givenlines \fIn-k\fP to \fIn+k\fP are listed where \fIn\fP is the first statementin the procedure or function and \fIk\fP is small..IP "\fBfile\fP [\fIfilename\fP]".NXR "file command (pdx)"Change the current source file name to \fIfilename\fP.If none is specified then the current source file name is printed..IP "\fBedit\fP [\fIfilename\fP]".ns.IP "\fBedit\fP \fIprocedure/function-name\fP".NXR "edit command (pdx)"Invoke an editor on \fIfilename\fP or the current source file if noneis specified.If a \fIprocedure\fP or \fIfunction\fP 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 overridden by setting the environment variableEDITOR to the name of the desired editor..IP \fBpi\fP.NXR "pi command (pdx)"Recompile the program and read in the new symbol table information..IP "\fBsh\fP \fIcommand-line\fP".NXR "sh command (pdx)"Pass the command line to the shell for execution.The SHELL environment variable determines which shell is used..IP "\fBalias\fP \fInew-command-name\fP \fIold-command-name\fP".NXR "alias command (pdx)"This command makes .PN pdxrespond to \fInew-command-name\fPthe way it used to respond to \fIold-command-name\fP..IP "\fBquit\fP".NXR "quit command (pdx)"Exit .PN pdx ..PPThe following commands deal with the program at the \fIpx\fP instructionlevel rather than source level..NXR "pdx debugger" "instructor-level commands"They are not intended for general use..TP\fBtracei\fP [\fIaddress\fP] [\fBif\fP \fIcond\fP].NXR "tracei command (pdx)".ns.TP\fBtracei\fP [\fIvariable\fP] [\fBat\fP \fIaddress\fP] [\fBif\fP \fIcond\fP].ns.TP\fBstopi\fP [\fIaddress\fP] [\fBif\fP \fIcond\fP].NXR "stopi command (pdx)".ns.TP\fBstopi\fP [\fBat\fP] [\fIaddress\fP] [\fBif\fP \fIcond\fP]Turn on tracing or set a stop using a \fIpx\fP machineinstruction addresses..TP\fBxi\fP \fIaddress\fP [\fB,\fP \fIaddress\fP].NXR "xi command (pdx)"Print the instructions starting at the first \fIaddress\fP.Instructions up tothe second \fIaddress\fP are printed..TP\fBxd\fP \fIaddress\fP [\fB,\fP \fIaddress\fP].NXR "xd command (pdx)"Print in octal the specified data location(s)..SH Options.NXR "pdx debugger" "option".IP \fB\-r\fR 5Causes.PN obifileto be executed immediately.  Normally.PN pdxprompts and waits for a command..SH Restrictions.NXR "pdx debugger" "restricted"The.PN pdxcommand does not understand sets,and provides no information about files..PPThe .PN whatiscommand doesn't quite work for variant records..PPUnexpected results occur if a procedure invoked withthe \fBcall\fP command does a non-local goto..SH Files.TP 10.PN objPascal object file.TP.PN \&.pdxinit .PN pdx initialization file.SH See Alsopi(1), px(1)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?