dbx.5.5
来自「早期freebsd实现」· 5 代码 · 共 299 行
5
299 行
.\" Copyright (c) 1985 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..\".\" @(#)dbx.5.5 6.3 (Berkeley) 4/30/91.\".TH DBX 5 "April 30, 1991".UC 6.SH NAMEdbx \- dbx symbol table information.SH DESCRIPTIONThe compiler symbol information generatedfor \fIdbx\fP(1) uses the same structureas described in \fIstab\fP(5), with additional type and scope informationappended to a symbol's name.The assembler directive used to describe symbol informationhas the following format:.sp 1.ti +8n\fBstabs\fR ``\fIstring\fP'',\fIkind\fP,0,\fIsize\fP,\fIvalue\fP.PP\fIString\fR contains the name, source language type, and scope of the symbol,\fIkind\fR specifies the memory class(e.g., external, static, parameter, local, register), and\fIsize\fR specifies the byte size of the object, if relevant.The third field (0 above) is unused.For a global variable or a type, \fIvalue\fR is unused;for a local variable or parameter, it is the offset from the frame pointer,for a register variable, it is the associated register number..PPThe different kinds of stab entries are interpreted by dbx as follows:.IP N_GSYM 10The symbol is a global variable (e.g., .comm variable).The variable's address can be found from the correspondingld(1) symbol entry, thus the value field for N_GSYM symbols is ignored.For example, a global variable ``x'' will have both an N_GSYM entry andan \fIld\fP(1) entry (e.g., N_BSS + N_EXT).See \fIa.out\fP(5) for details about these other entries.of .IP N_FUNThe symbol is a procedure or function.The size field contains the line number of the entry point.The value field contains the address of the entry point (in the text segment)..IP N_STSYMThe symbol is a statically allocated variable for whichan initial value has been specified.The value field contains the address of the variable (in the data segment)..IP N_LCSYMThe symbol is statically allocated, but not initialized..IP N_RSYMThe symbol is a register variable whose value is kept in the registerdenoted by the value field..IP N_PSYMThe symbol is a parameter whose value is pushed on the stack before the call.The value field contains the offset from the argument base pointer(on the VAX, the ap register)..IP N_LSYMThe symbol is a local variable whose value is stored in the most recentlydefined procedure's stack frame.The value is the (often negative) offset from the frame pointer(on the VAX, the fp register)..IP "N_PC, N_MOD2"The symbol defines separate compilation informationfor pre-linking checking for Berkeley Pascal and DEC Modula-2 programsrespectively.For Pascal, the value field contains the line numberthat the symbol is defined on.The value field is not used for Modula-2..PPMost of the source level information about a symbolis stored in the string field of the stab entry.Since strings are kept in a separate string table in the a.out file,they can be arbitrarily long.Thus there are no restrictions on the kind or length of informationin the string field, and it was not necessaryto modify the assembler or loader when extending or modifyingthe format of this information..sp.PPBelow is a grammar describing the syntax of the symbol string.Except in the case of a constant whose value is a string,there are no blanks in a symbol string..nf.ta 1i 2i 3i 4i 5i 6i 7i .sp 1NAME: [a-zA-Z_][a-zA-Z_0-9]*INTEGER: [-][0-9][0-9]*REAL: [+-][0-9]*(\.[0-9][0-9]*|)([eE]([+-]|)[0-9][0-9]*|)STRING: ``.*''BSTRING: .*String: NAME `:' Class `:' ClassClass: `c' `=' Constant `;' Variable Procedure Parameter NamedType `X' ExportInfo -- export or import information (for N_MOD2 only)Constant: `i' INTEGER `r' REAL `c' OrdValue `b' OrdValue `s' STRING `e' TypeId `,' OrdValue `S' TypeId `,' NumElements `,' NumBits `,' BSTRINGOrdValue: INTEGERNumElements: INTEGERNumBits: INTEGERVariable: TypeId -- local variable of type TypeId `r' TypeId -- register variable of type TypeId `S' TypeId -- module variable of type TypeId (static global in C) `V' TypeId -- own variable of type TypeId (static local in C) `G' TypeId -- global variable of type TypeIdProcedure: Proc -- top level procedure Proc `,' NAME `,' NAME -- local to first NAME, -- second NAME is corresponding ld symbol.need 8Proc: `P' -- global procedure `Q' -- local procedure (static in C) `I' -- internal procedure (different calling sequence) `F' TypeId -- function returning type TypeId `f' TypeId -- local function `J' TypeId -- internal functionParameter: `p' TypeId -- value parameter of type TypeId `v' TypeId -- reference parameter of type TypeIdNamedType: `t' TypeId -- type name for type TypeId `T' TypeId -- C structure tag name for struct TypeIdTypeId: INTEGER -- Unique (per compilation) number of type INTEGER `=' TypeDef -- Definition of type number INTEGER `=' TypeAttrs TypeDef---- Type attributes are extra information associated with a type,-- such as alignment constraints or pointer checking semantics.-- Dbx interprets some of these, but will ignore rather than complain-- about any it does not recognize. Therefore this is a way to add-- extra information for pre-linking checking.--TypeAttrs: `@' TypeAttrList `;'TypeAttrList: TypeAttrList `,' TypeAttr TypeAttrTypeAttr: `a' INTEGER -- align boundary `s' INTEGER -- size in bits `p' INTEGER -- pointer class (e.g., checking) BSTRING -- something elseTypeDef: INTEGER Subrange Array Record `e' EnumList `;' -- enumeration `*' TypeId -- pointer to TypeId `S' TypeId -- set of TypeId `d' TypeId -- file of TypeId ProcedureType `i' NAME `:' NAME `;' -- imported type ModuleName:Name `o' NAME `;' -- opaque type `i' NAME `:' NAME `,' TypeId `;' `o' NAME `,' TypeId `;'Subrange: `r' TypeId `;' INTEGER `;' INTEGERArray: `a' TypeId `;' TypeId -- array [TypeId] of TypeId `A' TypeId -- open array of TypeId `D' INTEGER `,' TypeId -- N-dim. dynamic array `E' INTEGER `,' TypeId -- N-dim. subarrayProcedureType: `f' TypeId `;' -- C function type `f' TypeId `,' NumParams `;' TParamList `;' `p' NumParams `;' TParamList `;'NumParams: INTEGERRecord: `s' ByteSize FieldList `;' -- structure/record `u' ByteSize FieldList `;' -- C unionByteSize: INTEGERFieldList : Field FieldList FieldField: NAME `:' TypeId `,' BitOffset `,' BitSize `;'BitSize: INTEGERBitOffset: INTEGEREnumList: Enum EnumList EnumEnum: NAME `:' OrdValue `,'ParamList: Param ParamList ParamParam: NAME `:' TypeId `,' PassBy `;'PassBy: INTEGERTParam: TypeId `,' PassBy `;'TParamList : TParam TParamList TParamExport: INTEGER ExportInfoExportInfo: `t' TypeId `f' TypeId `,' NumParams `;' ParamList `;' `p' NumParams `;' ParamList `;' `v' TypeId `c' `=' Constant.fi.PPA `?' indicates that the symbol information is continued inthe next stab entry.This directive can only occur where a `;' would otherwiseseparate the fields of a record or constants in an enumeration.It is useful when the number of elements in one of these listsis large..SH "SEE ALSO"dbx(1), stab(5), a.out(5)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?