adb.1
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1 代码 · 共 880 行 · 第 1/2 页
1
880 行
.\" SCCSID: @(#)adb.1 2.6 7/14/87.TH adb 1 VAX.SH Nameadb \- interactive C program debugger.SH Syntax.B adb[\fB\-w\fR] [\fB\-k\fR] [\fB\-I\fIdir\fR\|] [\fIobjfil \fR\|[\fIcorfil\fR\|]\|].ds TW \v'.25m'\s+2~\s-2\v'-.25m'.ds ST *.ds IM \v'.1m'=\v'-.1m'\s-2\h'-.1m'>\h'.1m'\s+2.ds LE \(<=.ds LT \s-2<\s+2.ds GT \s-2>\s+2.SH Description.NXR "adb debugger" .NXR "adb debugger" "od command".NXR "adb debugger" "core file".NXR "adb debugger" "options"The.PN adbcommand is a general purpose debugging program.It may be used to examine files and to providea controlled environment for the execution of UNIX programs..PPThe.I objfilis normally an executable program file, preferablycontaining a symbol table. If it does not contain asymbol table then the symbolic features of.PN adbcannot be used. However, the file can still be examined.The default for.I objfilis.PN a.out .The.I corfilis assumed to be a core image file produced after executing.IR objfil ;the default for.I corfilis.I core..PPRequests to.PN adbare read from the standard input and responses are to the standard output.If the.B \-wflag is present then both.I objfiland.I corfilare created if necessary and opened for reading and writingso that files can be modified using.PN adb ..PPThe \fB\-k\fP option makes .PN adbdo UNIX kernel memorymapping; it should be used when \fIcore\fP is a UNIX crash dumpor .PN /dev/mem ..PPThe \fB\-I\fP option specifies a directory where files to be readwith.PN $<or.PN $<<(see the EXPRESSIONS section) are sought. The default directory is.PN /usr/lib/adb ..PPThe.PN adbcommand ignores QUIT; INTERRUPT causes return to the next.PN adbcommand..PPIn general requests to.PN adbare of the form.PP.if n .ti 16.if t .ti 1.6i[\|\fIaddress\fR\|] [\|,.IR count \|][\|\fIcommand\fR\|] [\|;\|].PPIf.I addressis present then.I dotis set to.IR address .Initially.I dotis set to 0. For most commands.I countspecifies how many times the command is executed. The default.I countis 1..I Addressand.I countare expressions..PPThe interpretation of an address depends on its context.If a subprocess is being debugged then addresses are interpretedin the usual way in the address space of the subprocess.If the operating system is being debugged either post-mortem or usingthe special file.PN /dev/memto interactive examine and/or modify memory the maps are set to mapthe kernel virtual addresses which start at 0x80000000.For further details of address mapping, seeADDRESSES..SH Expressions.NXR "adb debugger" "expressions".TP 12.B .The value of.IR dot ..TP 12+The value of.I dotincremented by the current increment..TP 12^The value of.I dotdecremented by the current increment..TP 12"The last.I addresstyped..TP 12.I integerA number. The prefixes 0o and 0O (\*(lqzero oh\*(rq) force interpretationin octal radix; the prefixes 0t and 0T force interpretation indecimal radix; the prefixes 0x and 0X force interpretation inhexadecimal radix. Thus 0o20 = 0t16 = 0x10 = sixteen.If no prefix appears, then the.I default\ radixis used; see the.I $dcommand. The default radix is initially hexadecimal.The hexadecimal digits are 0123456789abcdefABCDEF with the obviousvalues. Note that a hexadecimal number whose most significantdigit would otherwise be an alphabetic character must have a 0x(or 0X) prefix (or a leading zero if the default radix is hexadecimal)..TP 12.IB integer . fractionA 32 bit floating point number..TP 12.I \'cccc\|\'The ASCII value of up to 4 characters..TP 12.I \*(LT nameThe value of.IR name ,which is either a variable name or a register name.The.PN adbdebuggermaintains a number of variables (seeVARIABLES)named by single letters or digits.If.I nameis a register name then the value of the register is obtained fromthe system header in.IR corfil .The register names are those printed by the.I $rcommand..TP 12.I symbolA.I symbolis a sequence of upper or lower case letters, underscores ordigits, not starting with a digit. The backslash character.B \e may be used to escape other characters. The value of the.I symbolis taken from the symbol table in.IR objfil .An initial underscore (_) will be prepended to.I symbolif needed..TP.I _ symbolIn C, the true name of an external symbol begins with _.It may be necessary to use this name to distinguish itfrom internal or hidden variables of a program..TP 12.IB routine . nameThe address of the variable.I namein the specified C routine. Both.I routineand.I nameare.IR symbols .If.I nameis omitted the value is the address of the most recently activated C stack framecorresponding to.IR routine .This form is currently broken on the VAX; local variables can be examinedonly with.MS dbx 1 ..TP 12.RI ( exp \|)The value of the expression.IR exp ..PP.B "Monadic\ operators".NXR "adb debugger" "monadic operators".TP 12.RI \*(ST expThe contents of the location addressed by.I expin.IR corfil ..TP 12.RI @ expThe contents of the location addressed by.I expin.IR objfil ..TP 12.RI \- expInteger negation..TP 12.RI \*(TW expBitwise complement..TP 12.RI # expLogical negation..PP.tr ''.B "Dyadic\ operators"are left associative and are less binding than monadic operators..NXR "adb debugger" "dyadic operators".TP 12.IR e1 + e2Integer addition..TP 12.IR e1 \- e2Integer subtraction..TP 12.IR e1 \*(ST e2Integer multiplication..TP 12.IR e1 % e2Integer division..TP 12.IR e1 & e2Bitwise conjunction..TP 12.IR e1 | e2Bitwise disjunction..TP 12.IR e1 # e2.I E1rounded up to the next multiple of.IR e2 ..DT.SH Commands.NXR "adb debugger" "command list"Most commands consist of a verb followed by a modifier or list of modifiers.The following verbs are available.The commands question mark (?) and slash (/) may be followed byan asterisk (*); see the ADDRESSES sectionfor further details..TP 12.RI ? fLocations starting at.I addressin.I objfilare printed according to the format.IR f ..I dotis incremented by the sum of the increments for each format letter. .TP.RI / fLocations starting at.I addressin.I corfilare printed according to the format.I fand.I dotis incremented as for question mark (?)..TP.RI = fThe value of.I addressitself is printed in the styles indicated by the format.IR f .(For.B i format, the question mark (?) is printed for the parts of theinstruction that reference subsequent words.).PPA.I formatconsists of one or more characters that specify a style of printing.Each format character may be preceded by a decimal integerthat is a repeat count for the format character.While stepping through a format,.I dotis incremented by the amount given for each format letter.If no format is given then the last format is used.The format letters available are as follows:.TP 12.BR o 2Print 2 bytes in octal. All octal numbers output by.PN adbare preceded by 0..br.ns.TP.BR O 4Print 4 bytes in octal..br.ns.TP.BR q 2Print in signed octal..br.ns.TP.BR Q 4Print long signed octal..br.ns.TP.BR d 2Print in decimal..br.ns.TP.BR D 4Print long decimal..br.ns.TP.BR x 2Print 2 bytes in hexadecimal..br.ns.TP.BR X 4Print 4 bytes in hexadecimal..br.ns.TP.BR u 2Print as an unsigned decimal number..br.ns.TP.BR U 4Print long unsigned decimal..br.ns.TP.BR f 4Print the 32 bit value as a floating point number..br.ns.TP.BR F 8Print double floating point..br.ns.TP.BR b 1Print the addressed byte in octal..br.ns.TP.BR c 1Print the addressed character..br.ns.TP.BR C 1Print the addressed character usingthe standard escape convention where control charactersare printed as ^X and the delete character is printed as ^?..br.ns.TP.BI s nPrint the addressed characters until a zero character is reached..br.ns.TP.BI S nPrint a string using the ^\fIX\fR escape convention (see the format\fBC1\fR above)..I nis the length of the string including its zero terminator..br.ns.TP.BR Y 4Print 4 bytes in date format. For further information, see.MS ctime 3 ..br.ns.TP.BI i nPrint as machine instructions..I nis the number of bytes occupied by the instruction.This style of printing causes variables 1 and 2 to be setto the offset parts of the source and destination respectively..br.ns.TP.BR a 0Print the value of.I dotin symbolic form.Symbols are checked to ensure that they have an appropriatetype as indicated below:.sp.RS 12 / local or global data symbol.br ? local or global text symbol
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?