* stabs.texinfo (Enumerations): Document restriction on where
authorJim Kingdon <jkingdon@engr.sgi.com>
Thu, 3 Feb 1994 16:44:13 +0000 (16:44 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Thu, 3 Feb 1994 16:44:13 +0000 (16:44 +0000)
enumeration types can appear and still win with GDB.

gdb/doc/ChangeLog
gdb/doc/stabs.texinfo

index 7a12f63..9358b19 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb  3 11:39:59 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+       * stabs.texinfo (Enumerations): Document restriction on where
+       enumeration types can appear and still win with GDB.
+
 Wed Feb  2 11:29:17 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
        * stabs.texinfo (Negative Type Numbers): Document format for type
index 85c2d4e..b9cd83e 100644 (file)
@@ -1892,6 +1892,18 @@ is determined by the architecture (normally all enumerations types are
 32 bits).  Type attributes can be used to specify an enumeration type of
 another size for debuggers which support them; see @ref{String Field}.
 
+Enumeration types are unusual in that they define symbols for the
+enumeration values (@code{first}, @code{second}, and @code{third} in the
+above example), and even though these symbols are visible in the file as
+a whole (rather than being in a more local namespace like structure
+member names), they are defined in the type definition for the
+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
+of the stabs) if the type is the first thing defined after a @samp{T} or
+@samp{t} symbol descriptor (the above example fulfills this
+requirement).  If the type does not have a name, the compiler should
+emit it in a nameless stab (@pxref{String Field}); GCC does this.
+
 @node Structures
 @section Structures