⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdx.1

📁 早期freebsd实现
💻 1
字号:
.\" Copyright (c) 1983, 1990, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"	@(#)pdx.1	8.1 (Berkeley) 6/6/93.\".Dd June 6, 1993.Dt PDX 1.Os BSD 4.2.Sh NAME.Nm pdx.Nd pascal debugger.Sh SYNOPSIS.Nm pdx.Op Fl r.Op Ar objfile.Sh DESCRIPTION.Nm Pdxis a tool for source level debugging and execution ofPascal programs.The.Ar objfileis an object file produced by the Pascal translator.Xr pi 1 .If no.Ar objfileis specified,.Nm 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.Xr pi 1to create it.These files are available for perusal while using the debugger..PpIf the file.Dq Pa .pdxinitexists in the current directory, then thedebugger commands in it are executed..Pp.Bl -tag -width flag r.It Fl rThe.Fl roption causes the.Ar objfileto be executed immediately;if it terminates successfully.Nm pdxexits.Otherwise it reports the reason for terminationand offers the user the option of entering the debuggeror simply letting.Xr pxcontinue with a traceback.If.Fl ris not specified,.Nm pdxjust prompts and waits for a command..El.PpThe commands are:.Pp.Bl -tag -width flag -compact.It Xo.Ic run.Op Ar args.Op Ic \&< Ar filename.Op Ic \&> Ar filename.XcStart executing.Ar objfile  ,passing.Ar argsas command line arguments;.Ic \&<or.Ic \&>can be used to redirect input or output in the usual manner..Pp.It Xo.Ic trace.Op Ic in Ar procedure/function.Op Ic if Ar condition .Xc.It Xo.Ic trace.Ar source-line-number.Op Ic if Ar condition.Xc.It Xo.Ic trace.Ar procedure/function.Op Ic in Ar procedure/function.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.Ar variable.Op Ic in Ar procedure/function.Op Ic if Ar condition .XcHave tracing information printed when the program is executed.A number is associated with the command that is usedto turn the tracing off (see the.Ic deletecommand)..PpThe first argument describes what is to be traced.If it is a.Ar source-line-number  ,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, e.g.``mumble.p:17''..PpIf 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..PpIf the argument is an.Ar expressionwith an.Ic atclausethen the value of the expression is printed whenever theidentified source line is reached..PpIf 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..PpIf no argument is specified then all source lines are printedbefore they are executed.Execution is substantially slower during this form of tracing..PpThe clause.Dq Ic in Ar procedure/function restricts tracing informationto be printed only while executing inside the given procedureor function..Pp.Ar Conditionis a Pascal boolean expression and isevaluated prior to printing the tracing information;if it is false then the information is not printed..PpThere is no restriction on the amount of informationthat can be traced..Pp.ne 10.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 .XcStop execution when the given line is reached, procedure or functioncalled, variable changed, or condition true..Pp.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 bythe.Ic statuscommand..Pp.It Ic status Op Ic \&> Ar filename Print outthe currently active.Ic traceand.Ic stopcommands..Pp.It Ic contContinue execution from where it stopped.This can only bedone when the program was stopped by an interruptor through use of the.Ic stopcommand..Pp.It Ic stepExecute one source line..Pp.It Ic nextExecute up to the next source line.The difference between this and.Ic stepis thatif the line contains a call to a procedure or functionthe.Ic stepcommand will stop at the beginning of thatblock, while the.Ic nextcommand will not..Pp.It Xo.Ic print Ar expression.Op Ic \&, Ar expression ... .XcPrint 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.Dq Ar block-name \&. variable.Pp.It Ic whatis Ar identifier Print the declaration of the given identifier..Pp.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.It Ic assign Ar variable Ar expression Assign the value of the expression to the variable..Pp.It Ic call Ar procedure Ns (parameters) Execute the object code associated with the named procedure or function..Pp.It Ic helpPrint out a synopsis of.Nm pdxcommands..Pp.It Ic gripeInvokes a mail program to send a message to the person in charge of.Nm pdx  ..Pp.It Ic wherePrint outa list of the active procedures and functions and the respective sourceline where they are called..Pp.It Ic source Ar filename Read.Nm pdxcommands from the given.Ar filename  .Especially useful when the.Ar filenamehas been created by redirectinga.Ic statuscommand from an earlier debugging session..Pp.It Ic dump Op Ic \&> Ar filename Print the names and values of all activedata..Pp.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 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.Ar n-kto.Ar n+kare listed where.Ar nis the first statementin the procedure or function and.Ar kis small..Pp.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.It Ic edit Op Ar filename .It Ic edit Ar procedure Ns / Ns Ar function-name Invoke an editor on.Ar filenameor the current source file if noneis specified.If a.Ar procedureor.Ar functionname 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 variable.Ev EDITORto the name of the desired editor..Pp.It Ic piRecompile the program and read in the new symbol table information..Pp.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.It Ic alias Ar new-command-name Ar old-command-name This command makes.Nm pdxrespond to.Ar new-command-namethe way it used to respond to.Ar old-command-name  ..Pp.It Ic quitExit.Nm pdx  ..El.PpThe following commands deal with the program at the.Ar pxinstructionlevel rather than source level.They are not intended for general use..Pp.Bl -tag -width Fl -compact.It Xo.Ic tracei.Op Ar address.Op Ic if Ar cond .Xc.It Xo.Ic tracei.Op Ar variable.Op Ic at Ar address.Op Ic if Ar cond .Xc.It Xo.Ic stopi.Op Ar address.Op Ic if Ar cond .Xc.It Xo.Ic stopi.Op Ic at.Op Ar address.Op Ic if Ar cond .XcTurn on tracing or set a stop using a.Ic pxmachineinstruction addresses..Pp.It Xo.Ic xi Ar address.Op Ic \&, Ar address .XcPrint the instructions starting at the first.Ar address  .Instructions up tothe second.Ar addressare printed..Pp.It Xo.Ic xd Ar address.Op Ic \&, Ar address .XcPrint in octal the specified data location(s)..El.Sh ENVIRONMENT.Bl -tag -width Ar.It Ev EDITORThe.Ic editfunction uses the.Ev EDITORenvironment variable to see what editor to use..It Ev SHELLThe function.Ic shchecks the.Ev SHELLvariable to see which shell toexecute..El.Sh FILES.Bl -tag -width .pdxinit -compact.It Pa objPascal object file.It Pa .pdxinit.Nm Pdxinitialization file.El.Sh SEE ALSO.Xr pi 1 ,.Xr px 1.Rs.%T "An Introduction to Pdx".Re.Sh HISTORY.Nm Pdxappeared in.Bx 4.2 ..Sh BUGS.Nm Pdxdoes not understand sets,and provides no information about files..PpThe.Ic whatiscommand doesn't quite work for variant records..PpBad things will happen if a procedure invoked withthe.Ic callcommand does a non-local goto..PpThe commands.Ic stepand.Ic nextshould be able to take a.Ar countthat specifies how many lines to execute..PpThere should be commands.Ic stepiand.Ic nextithat correspondto.Ic stepand.Ic nextbut work at the instruction level..PpThere should be a way to get an address associated witha line number, procedure or function, and variable..PpMost of the command names are too long..PpThe alias facility is quite weak..PpA.Xr csh 1 Ns \-likehistory capability would improve the situation.

⌨️ 快捷键说明

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