dbx.1

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

1
1,322
字号
\fR[\fIn\fR] \fBconti \fR[\fIsignal\fR].ns.TP 15\fBconti \fR[\fIsignal\fR] \fBto \fIaddress\fR.ns.TP 15\fBconti \fR[\fIsignal\fR] \fBin \fIprocedure/function\fRContinues execution of assembly code from where it stopped.  If you specify an integer \fIn\fP, thedebugger ignores that number of stops after it resumes programexecution.If you specify \fIsignal\fR, the process continues as though it receivedthe signal.  .IPIf you specify \fBto\fI address\fR, the debugger continues execution untilit reaches the specified address..IPIf you specify \fBin \fIprocedure/function\fR, the debugger resumes execution inthe named procedure or function..TP 15\fBnexti \fR[\fIinteger\fR]Executes up to the next machine instruction. If the machine instructionthat.PN dbxexecutes contains a call to a procedure or function, the debuggerexecutes the entire procedure or function. Program execution stopsfollowing the return from the procedure; that is, execution stops priorto execution of the machine instruction that follows the call..IPIf you specify an integer, the debugger performs \fIinteger\fP .B nextiinstructions..TP 15\fBstepi \fR[\fIinteger\fR]Executes the specified number of machine instructions.  If one of themachine instructions contains a call to a procedure or function, thedebugger stops at the first line of the procedure or function.The default is to execute one instruction..TP\fBstopi\fR \fIvariable\fR.ns.TP 15\fBstopi\fR \fR[\fIvariable\fR] [\fBat\fR \fIaddress\fR] [\fBif \fIcondition\fR].ns.TP 15\fBstopi \fR[\fIvariable\fR] \fR[\fBin \fIprocedure/function\fR] \fR[\fBif \fIcondition\fR]Stops when the specified variable changes value, the specified addressis reached, the specified condition is true, or the specified procedureor function is reached. .IPBy combining the arguments, you can cause the debugger to stop, forexample, only when the occurrence of \fIvariable\fP at the specifiedaddress changes value and \fIcondition\fP is true..TP 15\fBtracei \fIvariable\fR \fR[\fBat \fIaddress\fR] [\fBif \fIexpression\fR].ns.TP 15\fBtracei \fIvariable\fR [\fBin \fIprocedure/function\fR] \fR[\fBat \fIaddress\fR] [\fBif \fIexpression\fR].ns.TP 15\fBtracei \fIaddress\fR [\fBif \fIcondition\fR]Traces the value of \fIvariable\fP or the execution of a particularaddress. .IPWhen you trace the value of a variable, you can use \fBat \fIaddress\fR,\fBin \fIprocedure/function\fR, and \fBif \fIcondition\fR to control thespecific variable that is traced..IPYou can specify a condition when you trace the execution of an address.The debugger displays tracing information only when the condition istrue..TP 15\fBwheni \fR[\fIvariable\fR] [\fBat\fI address\fR] \fB{\fIcommand_list\fR\fB}.ns.TP 15\fBwheni \fR[\fIvariable\fR] [\fBin \fIprocedure/function\fR] \fB{\fIcommand_list\fR\fB}Executes the specified .PN dbxmachine command list. You can separate the commands by commas (,) orsemi-colons (;)..IPIf you specify \fIvariable\fP, the debugger executes the command listwhen the value of the variable changes. Specify \fBat \fIaddress\fR or\fBin \fIprocedure\fR to control which occurrence of the variable causesthe debugger to execute the command list..SS Predefined dbx VariablesThe debugger contains variables that control certain aspects of itsoperations. Some debugger variables are used internally by.PN dbx .You must not change the value of those variables. The debugger allows youto change the values of other variables using the.B setand.B unsetcommands. The following list describes the debugger variables you cancontrol:.TP 15.B $addrfmtSpecifies the format for addresses.  You can set this variable to anyformat that you can use with the.PN printffunction, except %s because the.PN %sconversion specification is not supported by.PN dbx . See the.MS printf 3sreference page for information on valid formats. By default, thisvariable is set to.PN 0x%x ,which specifies hexadecimal format..TP 15.B $casesenseWhen set to a nonzero value, specifies that uppercase and lowercaseletters be treated as different characters during a search.  When set to zero,.PN dbxignores the case of letters.  The default is zero..TP 15.B $datacacheCaches information from the data space so that .PN dbxmust access the data space only once. If this variable is set to zero, thedebugger does not cache data space. If your program contains any datadeclared as .PN volatile ,.PN dbxautomatically sets this variable to zero. To debug the operatingsystem, set this variable to zero; otherwise, set it to a nonzero value.  The default is a nonzero value..TP 15.B $dispixCauses the debugger to be in the correct mode to debug pixie code.  When set to zero, the debugger displaysmachine code while debugging.  When set to a nonzero value, the debugger displays pixie code.The default is zero..TP 15.B $hexcharsWhen set to a nonzero value, causes the debugger to display characters in hexadecimal format..TP 15.B $hexinWhen set to a nonzero value, causes the debugger to interpret input constants as hexadecimal. When set, this variable overrides the .B $octin variable..TP 15.B $hexintsWhen set to a nonzero value, changes the default output constantsto hexadecimal.  When set, this variable overrides the .B $octints variable..TP 15.B $hexstringsWhen set to a nonzero value, causes the debugger to display all strings in hexadecimal format. When set to zero, causes the debugger to displaystrings in character format..TP 15.B $historyeventStores the current history line..TP 15.B $linesDetermines how many lines the debugger stores in its history list.The default is 20 lines..TP 15.B $listwindowSpecifies how many lines the \fBlist\fR command displays..TP 15.B $mainSpecifies the name of the procedure or function that .PN dbxbegins when running the process.  The debugger can begin a process at any procedureor function. By default, the debugger begins a process at a procedurenamed main..TP 15.B $maxstrlenSpecifies how many characters of a string .PN dbxdisplays for pointers to strings.  The default is 128 characters..TP 15.B $octinWhen set to a nonzero value, changes the default input constants to octal.When set, the .B $hexin variable overrides this variable..TP 15.B $octintsWhen set to a nonzero value, causes .PN dbxto display integers in octal format. When set, the .B $hexints variableoverrides this variable..TP 15.B $pageSpecifies whether to page long information.  A nonzero value turns on paging;a zero turns it off.  The default is one..TP 15.B $pagewindowSpecifies how many lines the debugger displays when information runs longer thanone screen.  You can change this variable to match the number of lineson any terminal.  If set to zero, this variable assumes one line.The default is 22, leaving space for a continuation query..TP 15.B $printwhilestepDetermines whether the debugger displays source lines or instructionswhen executing the \fBstep\fR[\fIn\fR] and\fBstepi\fR[\fIn\fR] commands.When set to a nonzero value,  causes.PN dbxto display all \fIn\fR lines orinstructions. When set to zero, causes .PN dbx to display onlythe last line or instruction.  The defaultis zero..TP 15.B $pimodeDisplays input when used with the \fBplayback input\fR command.The default is zero..TP 15.B $printdataWhen set to a nonzero value, causes the debugger to display the contents of registers next to each instruction it displays. The debugger displays the registers used by theinstruction. The default is zero..TP 15.B $printwideWhen set to a nonzero value, causes the debugger to display the contents of variablesin a horizontal format. The default is zero..TP 15.B $promptSets the prompt for .PN dbx ..TP 15.B $readtextfileWhen set to a nonzero value, causes.PN dbx to read instructions from the object file rather than the process.  This variable should always be set to zero when the process beingdebugged copies in code during the debugging process.The default is a nonzero value. .TP 15.B $regstyleWhen set to a nonzero value, causes the debugger to display registers duringdisassembly in theirnormal \fIr\fR format (r0,r1,\&.\&.\&.r31).   When set to zero, causes thedebugger to display registers in a special format (zero, at, v0, v1,...), which is commonly used in debuggingprograms written in assembly language. The default is a nonzero value..IPSetting this variable does not affect how the debugger displays thenames of register when you issue the.B printregscommand. This variable affects the debugger's machine level commands..TP 15.B $repeatmodeWhen set to a nonzero value, causes.PN dbxto repeat the previous command if you press theReturn key at the .PN dbx prompt.The default is a nonzero value..TP 15.B $rimodeWhen set to a nonzero value, causes the debugger to record input while recording output.  The default is zero. .TP 15.B $sigvecTells .PN dbx the name of the code called by the system to invoke user signal handlers.  This variable is set to \fRsigvec\fR on ULTRIX systems..TP 15.B $symtotalStores the number of symbols that.PN dbxloads for the process you are debugging..TP 15.B $tagfileNames the file that contains tags for the current program. The.B tagand.B tagvaluecommands search the named file to resolve references to tags. For moreinformation on using tag files, see.MS ctags 1 ../".SS Predefined dbx Aliases./"The debugger has the following predefined aliases:./".TP 15./"\fB?\fR./"Prints a list of all ./".PN dbx./"commands../".TP 15./"\fBa\fR./"Assigns a value to a program variable../".TP 15./"\fBb\fR./"Sets a breakpoint at a specified line../".TP 15./"\fBbp\fR./"Stops in a specified procedure or function../".TP 15./"\fBc\fR./"Continues program execution after a breakpoint../".TP 15./"\fBd\fR./"Deletes the specified item from the status list../".TP 15./"\fBe\fR./"Looks at the specified file../".TP 15./"\fBf\fR./"Moves to the specified activation level on the stack../".TP 15./"\fBg\fR./"Goes to the specified line and begins executing the program there../".TP 15./"\fBh\fR./"Lists all items currently on the history list../".TP 15./"\fBj\fR./"Shows what items are on the status list../".TP 15./"\fBl\fR./"Lists the next 10 lines of source code../".TP 15./"\fBli\fR./"Lists the next 10 machine instructions../".TP 15./"\fBn\fR or \fBS\fR./"Step over the specified number of lines without stepping into procedures./"or functions../".TP 15./"\fBni\fR or \fRSi\fR./"Step over the specified number of assembly code instructions without ./"stepping into procedure calls../".TP 15./"\fBp\fR./"Prints the value of the specified expression or variable../".TP 15./"\fBpd\fR./"Prints the value of the specified expression or variable in decimal../".TP 15./"\fBpi\fR./"Replays ./".PN dbx./"commands that were saved with the \fBrecord./"input\fR command../".TP 15./"\fBpo\fR./"Prints the value of the specified expression or variable in octal../".TP 15./"\fBpr\fR./"Prints values for all registers. ./".TP 15./"\fBpx\fR./"Prints the value for the specified variable or expression in hexadecimal../".TP 15./"\fBq\fR./"Ends the debugging session../".TP 15./"\fBr\fR./"Runs the program again with the same arguments that were specified with the./"\fBrun\fR command../".TP 15./"\fBri\fR./"Records in a file every command typed../".TP 15./"\fBro\fR./"Records all debugger output in the specified file../".TP 15./"\fBs\fR./"Steps the next number of specified lines../".TP 15./"\fBsi\fR./"Steps the next number of specified lines of assembly code instructions../".TP 15./"\fBt\fR./"Does a stack trace../".TP 15./"\fBu\fR./"Lists the previous 10 lines../".TP 15./"\fBw\fR./"Lists the 5 lines preceding and following the current line../".TP 15./"\fBW\fR./"Lists the 10 lines preceding and following the current line../".TP 15./"\fBwi\fR./"Lists the 5 machine instructions preceding and following the ./"machine instruction..SH RestrictionsThe \fBprintf\fR debugger command does not support the.PN %s conversion specification..PPThe .PN dbxdebugger does not allow you to run a program you do not own unlessyou are logged in as root. If you are not root, the following messagemight be displayed on your screen when you issue the .B runcommand:.EXcannot write to address \fIaddress\fP in process \fIproc-number\fP.EEIn the message it displays,the debugger replaces \fIaddress\fR with the address to which it couldnot write and \fIproc-number\fR with the number of the process that containsthat address.This message is displayed when the.PN dbxdebugger tries to set breakpoints because of restrictions on the.PN ptracesystem call. The.PN dbxdebugger always tries to set a breakpoint on exit. If you repeat the .PN runcommand, your program runs without breakpoints. .SH Files.TP 15.PN a.outObject file.TP.PN coreCore dump file.TP.PN \&.dbxinitInitialization file.SH See Alsoac(1), cc(1), ctags(1), f77(1), pc(1), pcc(1), pixie(1), vi(1), signal(3),printf (3s).br\fIGuide to Languages and Programming\fP

⌨️ 快捷键说明

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