dbx.1

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

1
1,043
字号
of lines .PN dbxlists around a procedure or function or displays when you issue the \fBlist\fP commandwithout arguments.The default value for this variable is 10. .IP "$mapaddrs"Setting (unsetting) this variable causes .PN dbxto start (stop)mapping addresses.This variable is useful for kernel debugging..IP "$unsafecall".ns.IP "$unsafeassign"If you set one of these variables,.PN dbxdoes not perform strict type checking. When the .B $unsafecall variable is set,strict type checking is turned off for arguments toprocedure or function calls (for example, in the \fBcall\fP command). When the .B $unsafeassign variable is set, strict type checking between the two sidesof an \fBassign\fP command is turned off.Use these variables with care,because they severely limit the debugger'susefulnessfor detecting errors..RE.IP "\fBunalias\fP \fIname\fP" 10.NX R "unalias command (dbx)"Removes the alias with the specified name..IP "\fBunset\fP \fIname\fP".NX R "unset command (dbx)"Deletes the debugger variable associated with the name you specify..SS Vector Environment CommandsThe .PN dbxdebugger provides some special commands that you can use to debug aprogram that uses vectors. The following list explains these commands:.NXR "vector environment" "dbx commands for".IP "\fBcallv\fP \fIprocedure/function\fP[\fB(\fIparameters\fB)\fP]"Executes the object code associated with the named procedure or function.The.B callvcommand causes.PN dbxto save the vector environment before it executes the procedure. Thedebugger restores the vector environment after the procedure exits..IP "\fBfmask\fP[\fB/""\fIhex constant\fB""\fR] \fIvector_register\fP".ns.IP "\fBtmask\fP[\fB/""\fIhex constant\fB""\fR] \fIvector_register\fP".NX R "fmask command (dbx)".NX R "tmask command (dbx)"Displays the contents of the specified vector data register using thevector mask register (\fB$vmr\fR) or the hexadecimal constant youspecify as a mask value. Replace \fIvector_register\fR with the name ofa vector register to specify which vector data register the debuggerdisplays..IPThe \fBfmask\fR command causes the debugger to apply a false mask to theregister value. The \fBtmask\fR command causes the debugger to apply atrue mask to the register value..IP "\fBnextv\fP".NX R "nextv command (dbx)"Executes to the next vector instruction at the current or higherprocedure level. The.PN dbxdebugger ignores vector instructions at lower procedure levels whenexecuting this command. Thus, execution continues through lower levelprocedures, but stops prior to the next instruction at the current orhigher procedure level..IP "\fBstepv\fP".NX R "stepv command (dbx)"Executes the next vector instruction. The debugger stops executionprior to the next vector instruction regardless of the procedure levelof that instruction..SS Machine Level CommandsYou can use machine level commands to debug any program, regardless ofwhether the program object file contains extended symbol tableinformation..PPYou can specify symbolic addresses by preceding the name with an ampersand (&).You denote registers by \fB$r\fIN\fR where \fIN\fR is the number of the register. Youdenote vector registers by \fB$v\fIN\fR where \fIN\fR is the number of the register.Addresses may be expressions made up of other addresses andthe operators plus (+), minus (\-), and indirection (unary asterisk, *)..PPThe following describes the.PN dbxmachine level commands:.IP "\fIaddress\fP \fB,\fP \fIaddress\fP\fB/\fP [\fImode\fP]".ns.IP "\fIaddress\fP \fB/\fP [\fIcount\fP] [\fImode\fP]".ns.IP "\fIat source-line-number\fP \fB/\fP [\fIcount\fP] [\fImode\fP]"Display the contents of memory starting at the first \fIaddress\fP and continuing up to the second \fIaddress\fP..IP The second form causes.PN dbxto display the contents of memory starting at\fIaddress\fP and continuing until \fIcount\fP items are displayed.If you type a period (.) in the address field, .PN dbxuses the address followingthe one it most recently displayed..IP If you specify \fIat source-line-number\fP, .PN dbxdisplays the contents of memory associated with the specified source line.You can specify how many items the debugger displays using the\fIcount\fP argument..IP The \fImode\fP on each format specifies how .PN dbxdisplays memory;if you omit it, the debugger uses the previous mode.The initial mode is X..IP You can specify the following modes:.nr In 5.in +\n(Inn.ta \n(Inn.sp 1.ti -\n(Inn\&\fBb\fP	\cDisplays a byte in octal.ti -\n(Inn\&\fBc\fP	\cDisplays a byte as a character.ti -\n(Inn\&\fBd\fP	\cDisplays a short word in decimal.ti -\n(Inn\&\fBD\fP	\cDisplays a long word in decimal.ti -\n(Inn\&\fBf\fP	\cDisplays a single precision real number.ti -\n(Inn\&\fBg\fP	\cDisplays a double precision real number.ti -\n(Inn\&\fBi\fP	\cDisplays the machine instruction.ti -\n(Inn\&\fBo\fP	\cDisplays a short word in octal.ti -\n(Inn\&\fBO\fP	\cDisplays a long word in octal.ti -\n(Inn\&\fBs\fP	\cDisplays a string of characters terminated by a null byte.ti -\n(Inn\&\fBx\fP	\cDisplays a short word in hexadecimal.ti -\n(Inn\&\fBX\fP	\cDisplays a long word in hexadecimal.IP "\fBnexti\fP".NX R "nexti command (dbx)"Executes to the next machine instruction. If the machine instructionthat .PN dbxexecutes contains a call to a procedure or function, thedebugger executes the entire procedure or function. Program executionstops following the return from the procedure; that is, execution stops prior to execution of the machine instruction that follows the call..IP "\fBstepi\fP".NX R "stepi command (dbx)"Executes one machine instruction. If the machine instruction contains a call to aprocedure or function, thedebugger stops at the first line of the procedure or function..IP "\fBstopi\fP [\fBat\fP] [\fIaddress\fP] [\fBif\fP \fIcondition\fP]".NX R "stopi command (dbx)"Stops at the specified machine address or when the specified condition ismet. If you specify both \fIaddress\fP and \fIcondition\fP, the debugger stopsat the specified address only when the specified condition is true..IP "\fBtracei\fP [\fIaddress\fP] [\fBif\fP \fIcondition\fP]".ns.IP "\fBtracei\fP [\fIvariable\fP] [\fBat\fP \fIaddress\fP] [\fBif\fP \fIcondition\fP]".NX R "tracei command (dbx)"Displays tracing information during program execution. The first argumentspecifies an address at which tracing begins or the name of a variableto trace. .IPIf you specify tracing a variable at a specific address, .PN dbxdisplays the value of that variable when it reaches the address youspecify..IP The \fIcondition\fP argument is a Boolean expression that .PN dbxevaluates prior to displaying any tracing information. If the conditionis false, .PN dbx does not display the information..SS Miscellaneous Commands.NXR "dbx debugger" "miscellaneous commands"Use the following to get help about .PN dbx ,exit from the debugger, issue shell commands, and read commands froma file:.IP \fB!\fIstring\fR.ns.IP \fB!\fIinteger\fRExecutes a command from the history list. You can specify the commandname in the \fIstring\fR argument. If you specify an integer,.PN dbxexecutes the command having that number in the history list. For example,the following executes the third command in the history list:.EXdbx> \fB!3\fPreread.EEThe debugger echoes the command before execution. .IP "\fBhelp\fP".NX R "help command (dbx)"Displays a synopsis of .PN dbxcommands..IP "\fBhi[story]\fP".NX R "history command (dbx)"Displays a list of the previous commands you issued. By default,.PN dbxdisplays the previous 20 commands. You can change the number of commands.PN dbxkeeps in the history list by modifying the .B $historywindow debuggervariable. (For information on changing debugger variables, see Command Aliases And Variables.) .IP "\fBprintf \fIformat, arg1, arg2,...\fP".NX R "printf command (dbx)"Formats a complex structure for display as specified. You use the sameformat characters for this command as for the .PN printfsubroutine. For information on specifying the format, see.MS printf 3s ..IP "\fBquit\fP"Exits from .PN dbx ..IP "\fBrecord input\fR [\fIfilename\fR]Records all commands you enter at the .PN dbxprompt. The debugger stores the commands in the specified file. You canreplay the commands by naming the file on the.B sourcecommand line..IPIf you omit \fIfilename\fR, the debugger terminates the existingrecording session. If recording is not active, .PN dbxignores the command..NX R "sh command (dbx)".IP "\fBsh \fIcommand-line\fRPasses the command line to the shell for execution.The SHELL environment variable determines which shell is used..IP "\fBsource\fP \fIfilename\fP"Reads .PN dbxcommands from the specified file..SH RestrictionsIf you have a program consisting of several object files andeach is built from source files that include header files,the symbolic information for the header files is reproducedin each object code file.  Since one debugger startup usuallyis done for each link, having the .PN ldlinker reorganize the symbol information will not save much time,although it will reduce some of the disk space used.  .PPThisproblem results from the unrestricted semantics of.PN #include statements in C.  For example, an includefile can contain static declarations that are separateentities for each file in which they are included.If your image is too large for .PN dbxto run, compile with the.B \-goption only those files that you are interested in debugging. However,even with Modula-2, there is a substantial amount of duplication ofsymbol information necessary for inter-module type checking..PPThe following restrictions apply to debugging FORTRAN programs:.IP \(bu 4Inability to assign values to logical*2, complex, and double complex variables..IP \(bu 4Inabilityto represent parameter constants that are not type integeror real. .IP \(bu 4Peculiar representations of the values of dummyprocedures.  (The value shown for a dummy procedure is actuallythe first few bytes of the procedure text.  To find thelocation of the procedure, use an ampersand (&) to usethe address of the variable.).PPThe.PN dbxdebugger does not allow you to run a program you do not ownunless you are root.  If you are not root, the following messagemight be displayed on your screenwhen you issue the .PN runcommand:.EXcan't-write-to-process.EEThis message is displayed when the.PN dbx debugger tries to set breakpoints because of restrictionson the .PN ptracesystem call.  The .PN dbxdebugger always tries set a breakpointon exit. If you repeat the.PN runcommand, your programruns without breakpoints. .PPThe.B printfdebugger command does not support the.PN %sconversion specification..SH Files.TP 20.PN a.outObject file.TP.PN \&.dbxinitInitialization file.SH See Alsocc(1), pc(1), ptrace(1), vcc(1), signal(3), printf(3s)

⌨️ 快捷键说明

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