adb.1
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1 代码 · 共 880 行 · 第 1/2 页
1
880 行
.br = local or global absolute symbol.RE.TP.BR p 4Print the addressed value in symbolic form usingthe same rules for symbol lookup as.BR a 0..br.tr ''.ns.TP.BR t 0When preceded by an integer tabs to the next appropriate tab stop.For example,.B 8t moves to the next 8-space tab stop..br.ns.TP.BR r 0Print a space..br.ns.TP.BR n 0Print a new line..br.ns.tr '".TP.BR '...' 0Print the enclosed string..br.tr ''.br.ns.TP.B ^.I Dotis decremented by the current increment. Nothing is printed..br.ns.TP+.I Dotis incremented by 1. Nothing is printed..br.ns.TP\-.I Dotis decremented by 1. Nothing is printed..TPnewlineRepeat the previous command with a.I countof 1..TP.RB [ ?/ ] l "\fI value mask\fR"Words starting at.I dotare masked with.I maskand compared with.I valueuntil a match is found.If.B Lis used then the match is for 4 bytes at a time instead of 2.If no match is found then.I dotis unchanged; otherwise.I dotis set to the matched location.If.I maskis omitted then \-1 is used..TP.RB [ ?/ ] w "\fI value ...\fR"Write the 2-byte.I valueinto the addressed location. If the command is.BR W ,write 4 bytes.Odd addresses are not allowed when writing to the subprocess address space..TP[\fB?/\fR]\fBm\fI b1 e1 f1\fR[\fB?/\fR].brNew values for.RI ( b1,\ e1,\ f1 )are recorded. If less than three expressions are given thenthe remaining map parameters are left unchanged.If the `?' or `/' is followed by `\*(ST' thenthe second segment (\fIb2\fR\|,\|\fIe2\fR\|,\|\fIf2\fR)of the mapping is changed.If the list is terminated by `?' or `/' then the file (\fIobjfil\fR or.I corfilrespectively) is used for subsequent requests.So that, for example, `/m?' will cause `/' to refer to.IR objfil ..TP.BI \*(GT name.I Dotis assigned to the variable or register named..TP.B !A shell (/bin/sh) is called to read the rest of the line following `!'..TP.RI $ modifierMiscellaneous commands. The following.I modifiers are available:.RS 12.TP 5.BI < fRead commands from the file.IR f .If this command is executed in a file, further commandsin the file are not seen.If.I fis omitted, the current input stream is terminated. If a.I countis given, and is zero, the command will be ignored.The value of the count will be placed in variable.I 9before the first command in.I fis executed..TP 5.BI << fSimilar to.B <except it can be used in a file of commands withoutcausing the file to be closed. Variable.I 9is saved during the execution of this command, and restored when it completes.There is a (small) finite limit to the number of.B <<files that can be open at once..TP 5.BI > fAppend output to the file.IR f ,which is created if it does not exist. If.I fis omitted, output is returned to the terminal..TP 5.B ?Print process id, the signal which caused stoppage or termination,as well as registers such as.I $r. This is the default if\fImodifier\fR is omitted..TP 5.B rPrint the general registers and the instruction addressed by.BR pc ..I Dotis set to pc..TP 5.B bPrint all breakpoints and their associated counts and commands..TP 5.B cC stack backtrace. If.I addressis given then it is taken as the address of the current frame instead of the contents of the frame\-pointer register. If.B C is used then the names and (32 bit) values of all automaticand static variables are printed for each active function. (brokenon the VAX). If.I countis given then only the first.I countframes are printed..TP 5.B dSet the default radix to.I addressand report the new value. Note that.I addressis interpreted in the (old) current radix.Thus \*(lq10$d\*(rq never changes the default radix.To make decimal the default radix, use \*(lq0t10$d\*(rq..TP 5.B eThe names and values of external variables are printed..TP 5.B wSet the page width for output to.I address(default 80)..TP 5.B sSet the limit for symbol matches to.I address(default 255)..TP 5.B oAll integers input are regarded as octal..TP 5.B qExit from.PN adb ..TP 5.B vPrint all non zero variables in octal..TP 5.B mPrint the address map..TP 5.B p.RI ( "Kernel debugging" )Change the current kernel memory mapping to map the designated .B "user structure"to the address given by the symbol.I "_u."The.I addressargument is the address of the user's user page table entries. .TP 5.B x.RI ( "Kernel debugging" )The.I address argument is the CPU number.Change the current kernel memory mapping to that of the specified CPU. If no address is provided, the status of each of the CPUs in the system is displayed.This option is ONLY valid with the .B \-koption..RE.TP.BI : modifierManage a subprocess. The following modifiers are available:.RS 12.TP 5 .BI b cSet breakpoint at.IR address .The breakpoint is executed.IR count \-1times before causing a stop.Each time the breakpoint is encountered the command.I cis executed. If this command is omitted or sets.I dotto zero then the breakpoint causes a stop..TP 5.B dDelete breakpoint at.IR address ..TP 5.B rRun.I objfilas a subprocess. If.I addressis given explicitly then the program is entered at this point; otherwisethe program is entered at its standard entry point..I countspecifies how many breakpoints are to be ignored before stopping.Arguments to the subprocess may be supplied on the same line as the command.An argument starting with < or > causes the standardinput or output to be established for the command..TP 5.BI c sThe subprocess is continued with signal.I s,see.MS sigvec 2 .If.I addressis given then the subprocess is continued at this address.If no signal is specified then the signalthat caused the subprocess to stop is sent.Breakpoint skipping is the same as for.BR r ..TP 5.BI s sAs for.B c except that the subprocess is single stepped.I counttimes. If there is no current subprocess then.I objfilis run as a subprocess as for.BR r .In this case no signal can be sent; the remainder of the lineis treated as arguments to the subprocess..TP 5.B kThe current subprocess, if any, is terminated..RE.NXR "adb debugger" "command list".SH Variables.NXR "adb debugger" "variables"The.PN adbcommand provides a number of variables.Named variables are set initially by.PN adbbut are not used subsequently.The following numbered variables are reserved for communication:.TP0The last value printed..br.ns.TP1The last offset part of an instruction source..br.ns.TP2The previous value of variable 1..br.ns.TP9The count on the last.PN $<or.PN $<<command..PPOn entry the following are set from the system header in the.IR corfil .If.I corfildoes not appear to be a.B core file then these values are set from.IR objfil ..TPbThe base address of the data segment..br.ns.TPdThe data segment size..br.ns.TPeThe entry point..br.ns.TPmThe `magic' number (0407, 0410 or 0413)..br.ns.TPsThe stack segment size..br.ns.TPtThe text segment size..SH Addresses.NXR "adb debugger" "addresses"The address in a file associated witha written address is determined by a mapping associated with that file.Each mapping is represented by two triples.RI ( "b1, e1, f1" )and.RI ( "b2, e2, f2" )and the.I file addresscorresponding to a written.I addressis calculated as follows:.PP.if t .ti 1.5i.if n .ti 8.IR b1 \*(LE address < e1\*(IM.IR "file address" = address + f1\-b1,otherwise,.PP.if t .ti 1.5i.if n .ti 8.IR b2 \*(LE address < e2\*(IM.IR "file address" = address + f2\-b2,.PPotherwise, the requested.I addressis not legal. In some cases (for example, for programs with separated I and Dspace) the two segments for a file may overlap. If a.B ? or.B / is followed by an.B \*(ST then only the second triple is used..PPThe initial setting of both mappings is suitable for normal.B a.out and.B core files. If either file is not of the kind expected then, for that file,.I b1is set to 0,.I e1is set to the maximum file size and.I f1is set to 0. This way the wholefile can be examined with no address translation..PP.SH Restrictions.NXR "adb debugger" "restricted"Because no shell is invoked to interpret the arguments of the.PN :rcommand, the customary wildcard and variable expansions cannot occur..SH Diagnostics.NXR "adb debugger" "diagnostics"When there is no command or format given to.PN adb ,the string `adb' appears. .PN adbdisplays comments about inaccessible files, syntax errors,abnormal termination of commands, etc.Exit status is 0, unless last command failed or returned nonzero status..SH Files.PN a.out.br.PN core.SH See Alsocc(1), dbx(1), ptrace(2), a.out(5), core(5).NXR "adb debugger"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?