OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [doc/] [stabs.info-2] - Diff between revs 107 and 363

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 107 Rev 363
Line 1... Line 1...
This is stabs.info, produced by Makeinfo version 3.12f from
This is stabs.info, produced by makeinfo version 4.0 from
./stabs.texinfo.
./stabs.texinfo.
 
 
START-INFO-DIR-ENTRY
START-INFO-DIR-ENTRY
* Stabs: (stabs).                 The "stabs" debugging information format.
* Stabs: (stabs).                 The "stabs" debugging information format.
END-INFO-DIR-ENTRY
END-INFO-DIR-ENTRY
Line 199... Line 199...
     register.  WIDTH is normally the number of bytes in the type.
     register.  WIDTH is normally the number of bytes in the type.
     OFFSET seems to always be zero.  NBITS is the number of bits in
     OFFSET seems to always be zero.  NBITS is the number of bits in
     the type.
     the type.
 
 
     Note that type descriptor `b' used for builtin types conflicts with
     Note that type descriptor `b' used for builtin types conflicts with
     its use for Pascal space types (*note Miscellaneous Types::.);
     its use for Pascal space types (*note Miscellaneous Types::); they
     they can be distinguished because the character following the type
     can be distinguished because the character following the type
     descriptor will be a digit, `(', or `-' for a Pascal space type, or
     descriptor will be a digit, `(', or `-' for a Pascal space type, or
     `u' or `s' for a builtin type.
     `u' or `s' for a builtin type.
 
 
`w'
`w'
     Documented by AIX to define a wide character type, but their
     Documented by AIX to define a wide character type, but their
     compiler actually uses negative type numbers (*note Negative Type
     compiler actually uses negative type numbers (*note Negative Type
     Numbers::.).
     Numbers::).
 
 
`R FP-TYPE ; BYTES ;'
`R FP-TYPE ; BYTES ;'
     Define a floating point type.  FP-TYPE has one of the following
     Define a floating point type.  FP-TYPE has one of the following
     values:
     values:
 
 
Line 242... Line 242...
     doesn't understand FP-TYPE.
     doesn't understand FP-TYPE.
 
 
`g TYPE-INFORMATION ; NBITS'
`g TYPE-INFORMATION ; NBITS'
     Documented by AIX to define a floating type, but their compiler
     Documented by AIX to define a floating type, but their compiler
     actually uses negative type numbers (*note Negative Type
     actually uses negative type numbers (*note Negative Type
     Numbers::.).
     Numbers::).
 
 
`c TYPE-INFORMATION ; NBITS'
`c TYPE-INFORMATION ; NBITS'
     Documented by AIX to define a complex type, but their compiler
     Documented by AIX to define a complex type, but their compiler
     actually uses negative type numbers (*note Negative Type
     actually uses negative type numbers (*note Negative Type
     Numbers::.).
     Numbers::).
 
 
   The C `void' type is defined as a signed integral type 0 bits long:
   The C `void' type is defined as a signed integral type 0 bits long:
     .stabs "void:t19=bs0;0;0",128,0,0,0
     .stabs "void:t19=bs0;0;0",128,0,0,0
   The Solaris compiler seems to omit the trailing semicolon in this
   The Solaris compiler seems to omit the trailing semicolon in this
case.  Getting sloppy in this way is not a swift move because if a type
case.  Getting sloppy in this way is not a swift move because if a type
Line 280... Line 280...
sizes indicated below for each size are what the IBM RS/6000 tools use.
sizes indicated below for each size are what the IBM RS/6000 tools use.
To deal with differing sizes, either define separate negative type
To deal with differing sizes, either define separate negative type
numbers for each size (which works but requires changing the debugger,
numbers for each size (which works but requires changing the debugger,
and, unless you get both AIX dbx and GDB to accept the change,
and, unless you get both AIX dbx and GDB to accept the change,
introduces an incompatibility), or use a type attribute (*note String
introduces an incompatibility), or use a type attribute (*note String
Field::.) to define a new type with the appropriate size (which merely
Field::) to define a new type with the appropriate size (which merely
requires a debugger which understands type attributes, like AIX dbx or
requires a debugger which understands type attributes, like AIX dbx or
GDB).  For example,
GDB).  For example,
 
 
     .stabs "boolean:t10=@s8;-16",128,0,0,0
     .stabs "boolean:t10=@s8;-16",128,0,0,0
 
 
Line 456... Line 456...
 
 
`b TYPE-INFORMATION ; BYTES'
`b TYPE-INFORMATION ; BYTES'
     Pascal space type.  This is documented by IBM; what does it mean?
     Pascal space type.  This is documented by IBM; what does it mean?
 
 
     This use of the `b' type descriptor can be distinguished from its
     This use of the `b' type descriptor can be distinguished from its
     use for builtin integral types (*note Builtin Type Descriptors::.)
     use for builtin integral types (*note Builtin Type Descriptors::)
     because the character following the type descriptor is always a
     because the character following the type descriptor is always a
     digit, `(', or `-'.
     digit, `(', or `-'.
 
 
`B TYPE-INFORMATION'
`B TYPE-INFORMATION'
     A volatile-qualified version of TYPE-INFORMATION.  This is a Sun
     A volatile-qualified version of TYPE-INFORMATION.  This is a Sun
Line 479... Line 479...
 
 
`M TYPE-INFORMATION ; LENGTH'
`M TYPE-INFORMATION ; LENGTH'
     Multiple instance type.  The type seems to composed of LENGTH
     Multiple instance type.  The type seems to composed of LENGTH
     repetitions of TYPE-INFORMATION, for example `character*3' is
     repetitions of TYPE-INFORMATION, for example `character*3' is
     represented by `M-2;3', where `-2' is a reference to a character
     represented by `M-2;3', where `-2' is a reference to a character
     type (*note Negative Type Numbers::.).  I'm not sure how this
     type (*note Negative Type Numbers::).  I'm not sure how this
     differs from an array.  This appears to be a Fortran feature.
     differs from an array.  This appears to be a Fortran feature.
     LENGTH is a bound, like those in range types; see *Note
     LENGTH is a bound, like those in range types; see *Note
     Subranges::.
     Subranges::.
 
 
`S TYPE-INFORMATION'
`S TYPE-INFORMATION'
     Pascal set type.  TYPE-INFORMATION must be a small type such as an
     Pascal set type.  TYPE-INFORMATION must be a small type such as an
     enumeration or a subrange, and the type is a bitmask whose length
     enumeration or a subrange, and the type is a bitmask whose length
     is specified by the number of elements in TYPE-INFORMATION.
     is specified by the number of elements in TYPE-INFORMATION.
 
 
     In CHILL, if it is a bitstring instead of a set, also use the `S'
     In CHILL, if it is a bitstring instead of a set, also use the `S'
     type attribute (*note String Field::.).
     type attribute (*note String Field::).
 
 
`* TYPE-INFORMATION'
`* TYPE-INFORMATION'
     Pointer to TYPE-INFORMATION.
     Pointer to TYPE-INFORMATION.
 
 


Line 530... Line 530...
 
 
   Modula-2 imported types, at least on AIX, use the `i' type
   Modula-2 imported types, at least on AIX, use the `i' type
descriptor, which is followed by the name of the module from which the
descriptor, which is followed by the name of the module from which the
type is imported, followed by `:', followed by the name of the type.
type is imported, followed by `:', followed by the name of the type.
There is then optionally a comma followed by type information for the
There is then optionally a comma followed by type information for the
type.  This differs from merely naming the type (*note Typedefs::.) in
type.  This differs from merely naming the type (*note Typedefs::) in
that it identifies the module; I don't understand whether the name of
that it identifies the module; I don't understand whether the name of
the type given here is always just the same as the name we are giving
the type given here is always just the same as the name we are giving
it, or whether this type descriptor is used with a nameless stab (*note
it, or whether this type descriptor is used with a nameless stab (*note
String Field::.), or what.  The symbol ends with `;'.
String Field::), or what.  The symbol ends with `;'.
 
 


File: stabs.info,  Node: Subranges,  Next: Arrays,  Prev: Cross-References,  Up: Types
File: stabs.info,  Node: Subranges,  Next: Arrays,  Prev: Cross-References,  Up: Types
 
 
Subrange Types
Subrange Types
Line 548... Line 548...
type.  It is followed by type information for the type of which it is a
type.  It is followed by type information for the type of which it is a
subrange, a semicolon, an integral lower bound, a semicolon, an
subrange, a semicolon, an integral lower bound, a semicolon, an
integral upper bound, and a semicolon.  The AIX documentation does not
integral upper bound, and a semicolon.  The AIX documentation does not
specify the trailing semicolon, in an effort to specify array indexes
specify the trailing semicolon, in an effort to specify array indexes
more cleanly, but a subrange which is not an array index has always
more cleanly, but a subrange which is not an array index has always
included a trailing semicolon (*note Arrays::.).
included a trailing semicolon (*note Arrays::).
 
 
   Instead of an integer, either bound can be one of the following:
   Instead of an integer, either bound can be one of the following:
 
 
`A OFFSET'
`A OFFSET'
     The bound is passed by reference on the stack at offset OFFSET
     The bound is passed by reference on the stack at offset OFFSET
Line 587... Line 587...
example, if it is a type reference), there does not appear to be any
example, if it is a type reference), there does not appear to be any
way to tell where the types are separated.  In an effort to clean up
way to tell where the types are separated.  In an effort to clean up
this mess, IBM documents the two types as being separated by a
this mess, IBM documents the two types as being separated by a
semicolon, and a range type as not ending in a semicolon (but this is
semicolon, and a range type as not ending in a semicolon (but this is
not right for range types which are not array indexes, *note
not right for range types which are not array indexes, *note
Subranges::.).  I think probably the best solution is to specify that a
Subranges::).  I think probably the best solution is to specify that a
semicolon ends a range type, and that the index type and element type
semicolon ends a range type, and that the index type and element type
of an array are separated by a semicolon, but that if the index type is
of an array are separated by a semicolon, but that if the index type is
a range type, the extra semicolon can be omitted.  GDB (at least
a range type, the extra semicolon can be omitted.  GDB (at least
through version 4.9) doesn't support any kind of index type other than a
through version 4.9) doesn't support any kind of index type other than a
range anyway; I'm not sure about dbx.
range anyway; I'm not sure about dbx.
 
 
   It is well established, and widely used, that the type of the index,
   It is well established, and widely used, that the type of the index,
unlike most types found in the stabs, is merely a type definition, not
unlike most types found in the stabs, is merely a type definition, not
type information (*note String Field::.) (that is, it need not start
type information (*note String Field::) (that is, it need not start with
with `TYPE-NUMBER=' if it is defining a new type).  According to a
`TYPE-NUMBER=' if it is defining a new type).  According to a comment
comment in GDB, this is also true of the type of the array elements; it
in GDB, this is also true of the type of the array elements; it gives
gives `ar1;1;10;ar1;1;10;4' as a legitimate way to express a two
`ar1;1;10;ar1;1;10;4' as a legitimate way to express a two dimensional
dimensional array.  According to AIX documentation, the element type
array.  According to AIX documentation, the element type must be type
must be type information.  GDB accepts either.
information.  GDB accepts either.
 
 
   The type of the index is often a range type, expressed as the type
   The type of the index is often a range type, expressed as the type
descriptor `r' and some parameters.  It defines the size of the array.
descriptor `r' and some parameters.  It defines the size of the array.
In the example below, the range `r1;0;2;' defines an index type which
In the example below, the range `r1;0;2;' defines an index type which
is a subrange of type 1 (integer), with a lower bound of 0 and an upper
is a subrange of type 1 (integer), with a lower bound of 0 and an upper
Line 629... Line 629...
   If an array is "packed", the elements are spaced more closely than
   If an array is "packed", the elements are spaced more closely than
normal, saving memory at the expense of speed.  For example, an array
normal, saving memory at the expense of speed.  For example, an array
of 3-byte objects might, if unpacked, have each element aligned on a
of 3-byte objects might, if unpacked, have each element aligned on a
4-byte boundary, but if packed, have no padding.  One way to specify
4-byte boundary, but if packed, have no padding.  One way to specify
that something is packed is with type attributes (*note String
that something is packed is with type attributes (*note String
Field::.).  In the case of arrays, another is to use the `P' type
Field::).  In the case of arrays, another is to use the `P' type
descriptor instead of `a'.  Other than specifying a packed array, `P'
descriptor instead of `a'.  Other than specifying a packed array, `P'
is identical to `a'.
is identical to `a'.
 
 
   An open array is represented by the `A' type descriptor followed by
   An open array is represented by the `A' type descriptor followed by
type information specifying the type of the array elements.
type information specifying the type of the array elements.
Line 677... Line 677...
`N'
`N'
     Pascal Stringptr.  What is this?  This is an AIX feature.
     Pascal Stringptr.  What is this?  This is an AIX feature.
 
 
   Languages, such as CHILL which have a string type which is basically
   Languages, such as CHILL which have a string type which is basically
just an array of characters use the `S' type attribute (*note String
just an array of characters use the `S' type attribute (*note String
Field::.).
Field::).
 
 


File: stabs.info,  Node: Enumerations,  Next: Structures,  Prev: Strings,  Up: Types
File: stabs.info,  Node: Enumerations,  Next: Structures,  Prev: Strings,  Up: Types
 
 
Enumerations
Enumerations
Line 729... Line 729...
enumeration type rather than each having their own symbol.  In order to
enumeration type rather than each having their own symbol.  In order to
be fast, GDB will only get symbols from such types (in its initial scan
be fast, GDB will only get symbols from such types (in its initial scan
of the stabs) if the type is the first thing defined after a `T' or `t'
of the stabs) if the type is the first thing defined after a `T' or `t'
symbol descriptor (the above example fulfills this requirement).  If
symbol descriptor (the above example fulfills this requirement).  If
the type does not have a name, the compiler should emit it in a
the type does not have a name, the compiler should emit it in a
nameless stab (*note String Field::.); GCC does this.
nameless stab (*note String Field::); GCC does this.
 
 


File: stabs.info,  Node: Structures,  Next: Typedefs,  Prev: Enumerations,  Up: Types
File: stabs.info,  Node: Structures,  Next: Typedefs,  Prev: Enumerations,  Up: Types
 
 
Structures
Structures
Line 799... Line 799...
 
 
Giving a Type a Name
Giving a Type a Name
====================
====================
 
 
   To give a type a name, use the `t' symbol descriptor.  The type is
   To give a type a name, use the `t' symbol descriptor.  The type is
specified by the type information (*note String Field::.) for the stab.
specified by the type information (*note String Field::) for the stab.
For example,
For example,
 
 
     .stabs "s_typedef:t16",128,0,0,0     # 128 is N_LSYM
     .stabs "s_typedef:t16",128,0,0,0     # 128 is N_LSYM
 
 
   specifies that `s_typedef' refers to type number 16.  Such stabs
   specifies that `s_typedef' refers to type number 16.  Such stabs
Line 816... Line 816...
 
 
   If the type is an opaque type (I believe this is a Modula-2 feature),
   If the type is an opaque type (I believe this is a Modula-2 feature),
AIX provides a type descriptor to specify it.  The type descriptor is
AIX provides a type descriptor to specify it.  The type descriptor is
`o' and is followed by a name.  I don't know what the name means--is it
`o' and is followed by a name.  I don't know what the name means--is it
always the same as the name of the type, or is this type descriptor
always the same as the name of the type, or is this type descriptor
used with a nameless stab (*note String Field::.)?  There optionally
used with a nameless stab (*note String Field::)?  There optionally
follows a comma followed by type information which defines the type of
follows a comma followed by type information which defines the type of
this type.  If omitted, a semicolon is used in place of the comma and
this type.  If omitted, a semicolon is used in place of the comma and
the type information, and the type is much like a generic pointer
the type information, and the type is much like a generic pointer
type--it has a known size but little else about it is specified.
type--it has a known size but little else about it is specified.
 
 
Line 864... Line 864...
   The stab for the union variable is:
   The stab for the union variable is:
 
 
     .stabs "an_u:23",128,0,0,-20     # 128 is N_LSYM
     .stabs "an_u:23",128,0,0,-20     # 128 is N_LSYM
 
 
   `-20' specifies where the variable is stored (*note Stack
   `-20' specifies where the variable is stored (*note Stack
Variables::.).
Variables::).
 
 


File: stabs.info,  Node: Function Types,  Prev: Unions,  Up: Types
File: stabs.info,  Node: Function Types,  Prev: Unions,  Up: Types
 
 
Function Types
Function Types
==============
==============
 
 
   Various types can be defined for function variables.  These types are
   Various types can be defined for function variables.  These types are
not used in defining functions (*note Procedures::.); they are used for
not used in defining functions (*note Procedures::); they are used for
things like pointers to functions.
things like pointers to functions.
 
 
   The simple, traditional, type is type descriptor `f' is followed by
   The simple, traditional, type is type descriptor `f' is followed by
type information for the return type of the function, followed by a
type information for the return type of the function, followed by a
semicolon.
semicolon.
Line 1051... Line 1051...
 
 
Transformations of Stabs in separate sections
Transformations of Stabs in separate sections
---------------------------------------------
---------------------------------------------
 
 
   For object file formats using stabs in separate sections (*note Stab
   For object file formats using stabs in separate sections (*note Stab
Sections::.), use `objdump --stabs' instead of `nm' to show the stabs
Sections::), use `objdump --stabs' instead of `nm' to show the stabs in
in an object or executable file.  `objdump' is a GNU utility; Sun does
an object or executable file.  `objdump' is a GNU utility; Sun does not
not provide any equivalent.
provide any equivalent.
 
 
   The following example is for a stab whose value is an address is
   The following example is for a stab whose value is an address is
relative to the compilation unit (*note ELF Linker Relocation::.).  For
relative to the compilation unit (*note ELF Linker Relocation::).  For
example, if the source line
example, if the source line
 
 
     static int ld = 5;
     static int ld = 5;
 
 
   appears within a function, then the assembly language output from the
   appears within a function, then the assembly language output from the
Line 1115... Line 1115...
===============
===============
 
 
   In C++, a class name which is declared with `class', `struct', or
   In C++, a class name which is declared with `class', `struct', or
`union', is not only a tag, as in C, but also a type name.  Thus there
`union', is not only a tag, as in C, but also a type name.  Thus there
should be stabs with both `t' and `T' symbol descriptors (*note
should be stabs with both `t' and `T' symbol descriptors (*note
Typedefs::.).
Typedefs::).
 
 
   To save space, there is a special abbreviation for this case.  If the
   To save space, there is a special abbreviation for this case.  If the
`T' symbol descriptor is followed by `t', then the stab defines both a
`T' symbol descriptor is followed by `t', then the stab defines both a
type name and a tag.
type name and a tag.
 
 
Line 1145... Line 1145...
   In C++, a symbol (such as a type name) can be defined within another
   In C++, a symbol (such as a type name) can be defined within another
type.
type.
 
 
   In stabs, this is sometimes represented by making the name of a
   In stabs, this is sometimes represented by making the name of a
symbol which contains `::'.  Such a pair of colons does not end the name
symbol which contains `::'.  Such a pair of colons does not end the name
of the symbol, the way a single colon would (*note String Field::.).
of the symbol, the way a single colon would (*note String Field::).  I'm
I'm not sure how consistently used or well thought out this mechanism
not sure how consistently used or well thought out this mechanism is.
is.  So that a pair of colons in this position always has this meaning,
So that a pair of colons in this position always has this meaning, `:'
`:' cannot be used as a symbol descriptor.
cannot be used as a symbol descriptor.
 
 
   For example, if the string for a stab is `foo::bar::baz:t5=*6', then
   For example, if the string for a stab is `foo::bar::baz:t5=*6', then
`foo::bar::baz' is the name of the symbol, `t' is the symbol
`foo::bar::baz' is the name of the symbol, `t' is the symbol
descriptor, and `5=*6' is the type information.
descriptor, and `5=*6' is the type information.
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.