Home | History | Annotate | Download | only in info

Lines Matching full:stab

53 * Stab Types::			Symbol types in a.out files
56 * Expanded Reference:: Reference information by stab type
58 * Stab Sections:: In some object file formats, stabs are
60 * Symbol Types Index:: Index of symbolic stab symbol type names.
91 * Stabs Format:: Overview of stab format
115 encapsulated in assembler directives known collectively as "stab"
131 1.2 Overview of Stab Format
134 There are three overall formats for stab assembler directives,
135 differentiated by the first word of the stab. The name of the directive
141 The overall format of each class of stab is:
155 which type of stab this is (or whether it _is_ a stab, as opposed to an
156 ordinary symbol). Each valid type number defines a different stab
157 type; further, the stab type defines the exact interpretation of, and
159 present in the stab. *Note Stab Types::, for a list in numeric order
160 of the valid TYPE field values for stab directives.
170 extensible. For some stab types the string field contains only a name.
171 For other stab types the contents can be a great deal more complex.
173 The overall format of the string field for most stab types is:
177 NAME is the name of the symbol represented by the stab; it can
179 omitted, which means the stab represents an unnamed object. For
187 that tells more specifically what kind of symbol the stab represents.
189 the stab represents a local variable. For a list of symbol
267 several `.stabs' directives. Each stab duplicates every field except
268 the string field. The string field of every stab except the last is
272 stab produces the original, long string. Just to be incompatible (or so
300 This simple "hello world" example demonstrates several of the stab
385 stab type tells the debugger the name that is used in this program.
387 which is the main program. Most C compilers do not use this stab (they
389 compilers emit an `N_MAIN' stab for the `main' function. I'm not sure
398 Before any other stabs occur, there must be a stab specifying the source
399 file. This information is contained in a symbol of stab type `N_SO';
526 absolute; for stabs in sections (*note Stab Sections::), it is relative
534 the desc field of the stab for the variable itself. GDB has been
557 which means that the value of the stab for the function is useless and
558 the debugger must get the address of the function from the non-stab
559 symbols instead. On systems where non-stab symbols have leading
561 know about the leading underscore to match up the stab and the non-stab
573 the address can be found from the ELF (non-stab) symbol. Because
577 probably be better to make the value of the stab an address relative to
580 files. For XCOFF, the stab uses the `C_FUN' storage class and the
581 value of the stab is meaningless; the address of the function can be
584 The type information of the stab represents the return type of the
587 function from the stab for the function; it is in the next `N_SLINE'
593 extension is in use, the type information of the stab for the function
611 prototype in ANSI C), traditionally compilers emit no stab; the only
616 each preceded by `;', as in a stab with symbol descriptor `f' or `F'.
634 The following example shows a stab for a function `main' which
641 The stab representing a procedure is located immediately following
642 the code of the procedure. This stab is in turn directly followed by a
700 brace) and the `N_RBRAC' (right brace) stab types. The variables
708 (*note Stab Sections::), they are relative to the function in which
712 procedure are located after the `N_FUN' stab that represents the
731 point. The `N_ENTRY' stab is for this; however, the Sun FORTRAN
733 of a `C_ENTRY' stab is significant; the address of the alternate entry
735 revision of this document said that the value of an `N_ENTRY' stab was
745 The `c' symbol descriptor indicates that this stab represents a
839 Each variable allocated on the stack has a stab with the symbol
846 variables use the `N_LSYM' stab type, or `C_LSYM' for XCOFF.
848 The value of the stab is the offset of the variable within the local
850 and is negative. The location of the stab specifies which block it is
868 See *note Procedures:: for more information on the `N_FUN' stab, and
880 stab type (C_GSYM for XCOFF). The type information for the stab (*note
896 contained in the `N_GSYM' stab. The debugger gets this information
903 `N_GSYM' stab for each compilation unit which references the variable.
911 Register variables have their own stab type, `N_RSYM' (`C_RSYM' for
912 XCOFF), and their own symbol descriptor, `r'. The stab's value is the
925 then the stab may be emitted at the end of the object file, with the
938 A `N_BCOMM' stab begins a common block and an `N_ECOMM' stab ends
946 `N_BCOMM' and the `N_ECOMM'; the value of each stab is the offset
947 within the common block of that variable. IBM uses the `C_ECOML' stab
948 type, and there is a corresponding `N_ECOML' stab type, but Sun's
964 the stab is located within a function.
985 In XCOFF files, the stab type need not indicate the section;
996 the stab type need not indicate the section.
1003 debugger gets the address from the corresponding ELF (not stab) symbol.
1008 problems. For more information on linker stab relocation, *Note ELF
1042 So in the above example, the value of the `foo' stab is the address of
1043 a pointer to a real, the value of the `foo10' stab is the address of a
1045 stab is the address of a pointer to a 5-element array of 10-element
1054 Formal parameters to a function are represented by a stab (or sometimes
1057 parameters are declared in the source file). The exact form of the stab
1189 which it has printed because each one has a stab. For example, in
1229 array. The value of the `x' stab is the offset in the argument list
1231 guess); the value of the `C' stab is the offset in the argument list
1469 the builtin type. There is no stab defining these types.
1735 it, or whether this type descriptor is used with a nameless stab (*note
1900 generates the following stab:
1904 The symbol descriptor (`T') says that the stab describes a
1932 nameless stab (*note String Field::); GCC does this.
1948 stab and code for the structure variable itself is located at the end
1960 The structure tag has an `N_LSYM' stab type because, like the
2002 specified by the type information (*note String Field::) for the stab.
2019 used with a nameless stab (*note String Field::)? There optionally
2037 This code generates a stab for a union tag and a stab for a union
2038 variable. Both use the `N_LSYM' stab type. If a union variable is
2039 scoped locally to the procedure in which it is defined, its stab is
2043 The stab for the union tag, however, is located preceding the code
2044 for the procedure in which it is defined. The stab type is `N_LSYM'.
2047 the stab for `u_type' do not convey any information about its procedure
2054 The symbol descriptor `T', following the `name:' means that the stab
2062 The stab for the union variable is:
2121 `N_MAC_DEFINE' stab with a string field of `MACRO-NAME MACRO-BODY'.
2173 This chapter describes the format of symbol table entries and how stab
2188 Each time the assembler encounters a stab directive, it puts each field
2189 of the stab into a corresponding field in a symbol table entry of its
2190 output file. If the stab contains a string field, the symbol table
2191 entry for that stab points to a string table entry containing the
2192 string data from the stab. Assembler labels become relocatable
2203 If the stab has a string, the `n_strx' field holds the offset in
2205 by a NUL character. If the stab lacks a string (for example, it was
2223 You can see the transformations made on stab data by the assembler
2226 debugging information, unsorted. For stab entries the columns are:
2230 The low 5 bits of the stab type tell the linker how to relocate the
2231 value of the stab. Thus for stab types like `N_RSYM' and `N_LSYM',
2235 Where the value of a stab contains an assembly language label, it is
2243 * Stab Section Transformations:: For some object file formats,
2256 The following stab describes the symbol:
2260 The assembler transforms the stab into this symbol table entry in the
2271 File: stabs.info, Node: Transformations On Global Variables, Next: Stab Section Transformations, Prev: Transformations On Static Variables, Up: Transformations On Symbol Tables
2282 generates the stab:
2287 file (see below). The first one originated as a stab. The second one
2290 stab's value is zero since the value is not used for `N_GSYM' stabs.
2305 File: stabs.info, Node: Stab Section Transformations, Prev: Transformations On Global Variables, Up: Transformations On Symbol Tables
2310 For object file formats using stabs in separate sections (*note Stab
2315 The following example is for a stab whose value is an address is
2344 File: stabs.info, Node: Cplusplus, Next: Stab Types, Prev: Symbol Tables, Up: Top
2378 `T' symbol descriptor is followed by `t', then the stab defines both a
2410 For example, if the string for a stab is `foo::bar::baz:t5=*6', then
2460 extensively on the stab format used to describe structure types in C.
2472 The class `baseA' is represented by two stabs. The first stab
2473 describes the class as a structure type. The second stab describes a
2474 structure tag of the class type. Both stabs are of stab type `N_LSYM'.
2475 Since the stab is not located between an `N_FUN' and an `N_LBRAC' stab
2479 A stab describing a C++ class type is similar in format to a stab
2486 In this simple example the field part of the C++ class stab
2488 stab. The section on protections describes how its format is sometimes
2491 The field part of a C++ class stab representing a member function
2492 differs substantially from the field part of a C struct stab. It still
2549 accomplished by massively extending the stab format used in C to
2558 yields the following stab describing the class instance. It looks no
2559 different from a standard C stab describing a local variable.
2581 method. One stab describes the method itself and following two describe
2596 Here is the stab for the `this' pointer implicit argument. The name
2598 defined as a pointer to type 20, `baseA', but a stab defining `baseA'
2609 The stab for the explicit integer argument looks just like a
2610 parameter to a C function. The last field of the stab is the offset
2661 generates the following stab:
2703 generates the following stab:
2715 in the field part of the stab describing the method. The digit is 0 if
2728 It generates the following stab. The digit in question is to the
2767 This class is described by the following stab:
2800 This results in the stab below describing class A. It defines a new
2837 case the class stab describes a base class so the virtual function is
2839 reference is to the type number of the class that the stab is
2847 string part of the stab holds a type reference to the first base class.
2871 describe the inheritance hierarchy of the class. A derived class stab
2877 This additional information is embedded in the class stab following
2942 In the stab describing derived class `D' below, the information about
2973 In a derived class stab, the base offset part of the derivation
2979 The field information part of the stab for class `D' describes the
3013 description in the class stab shows this ordering.
3019 File: stabs.info, Node: Stab Types, Next: Symbol Descriptors, Prev: Cplusplus, Up: Top
3021 Appendix A Table of Stab Types
3024 The following are all the possible values for the stab type field, for
3026 does apply to stabs in sections (*note Stab Sections::). Stabs in
3027 ECOFF use these values but add 0x8f300 to distinguish them from non-stab
3034 * Non-Stab Symbol Types:: Types from 0 to 0x1f
3035 * Stab Symbol Types:: Types from 0x20 to 0xff
3038 File: stabs.info, Node: Non-Stab Symbol Types, Next: Stab Symbol Types, Up: Stab Types
3040 A.1 Non-Stab Symbol Types
3043 The following types are used by the linker and assembler, not by stab
3111 File: stabs.info, Node: Stab Symbol Types, Prev: Non-Stab Symbol Types, Up: Stab Types
3113 A.2 Stab Symbol Types
3116 The following symbol types indicate that this is a stab. This is the
3117 full list of stab numbers, including stab types that are used in
3202 Last stab for module (Solaris2).
3266 File: stabs.info, Node: Symbol Descriptors, Next: Type Descriptors, Prev: Stab Types, Up: Top
3272 stabs, and which tells what kind of stab it is. *Note String Field::,
3523 Appendix D Expanded Reference by Stab Type
3526 For a full list of stab types, and cross-references to where they are
3527 described, see *note Stab Types::. This appendix just covers certain
3533 The first line is the symbol type (see `include/aout/stab.def').
3538 The third line is the stab format with the significant stab fields
3542 significant stab field.
3572 value -> supposedly the line number (stab.def is skeptical)
3588 0, files,,funcs,lines (stab.def)
3600 name, ,0,type,ignored (stab.def)
3666 -- `.stab?': N_MOD2
3681 is nonzero if this entry is immediately followed by a `CAUGHT' stab
3705 -- `.stab?': N_SCOPE
3714 -- `.stab?': N_NBTEXT
3715 -- `.stab?': N_NBDATA
3716 -- `.stab?': N_NBBSS
3717 -- `.stab?': N_NBSTS
3718 -- `.stab?': N_NBLCS
3746 File: stabs.info, Node: Questions, Next: Stab Sections, Prev: Expanded Reference, Up: Top
3765 all use the `N_LSYM' stab type. Types defined at procedure scope
3778 File: stabs.info, Node: Stab Sections, Next: Symbol Types Index, Prev: Questions, Up: Top
3791 * Stab Section Basics:: How to embed stabs in sections
3795 File: stabs.info, Node: Stab Section Basics, Next: ELF Linker Relocation, Up: Stab Sections
3800 The assembler creates two custom sections, a section named `.stab'
3801 which contains an array of fixed length structures, one struct per stab,
3803 strings that are referenced by stabs in the `.stab' section. The byte
3811 unit (which can be found using the synthetic N_UNDF stab described
3814 The first stab in the `.stab' section for each compilation unit is
3816 `.stab' directive as input to the assembler. This stab contains the
3841 The ELF section header for the `.stab' section has its `sh_link'
3847 For COFF, the `.stab' and `.stabstr' sections may be simply
3853 otherwise manipulate `.stab' and `.stabstr' sections, it also requires
3867 File: stabs.info, Node: ELF Linker Relocation, Prev: Stab Section Basics, Up: Stab Sections
3884 Since these are ELF (not stab) symbols, the linker relocates them
3889 how these symbols work, *Note Stab Section Transformations::. GCC does
3902 (making the value of the stab relative to the start of the compilation
3908 the linker simply concatenates the `.stab' sections from each `.o' file
3909 without including any information about which part of a `.stab' section
3920 stab symbols. However, no one has yet designed or implemented such a
4410 File: stabs.info, Node: Symbol Types Index, Next: GNU Free Documentation License, Prev: Stab Sections, Up: Top
4548 Node: Stab Section Transformations94129
4564 Node: Stab Types123397
4565 Node: Non-Stab Symbol Types124021
4566 Node: Stab Symbol Types125452
4584 Node: Stab Sections143203
4585 Node: Stab Section Basics143801