From cf7416ec3f777730180ccf4f4c02c4a8301ab79f Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Thu, 3 Feb 1994 16:44:13 +0000 Subject: [PATCH] * stabs.texinfo (Enumerations): Document restriction on where enumeration types can appear and still win with GDB. --- gdb/doc/ChangeLog | 5 +++++ gdb/doc/stabs.texinfo | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 7a12f63..9358b19 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -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 diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo index 85c2d4e..b9cd83e 100644 --- a/gdb/doc/stabs.texinfo +++ b/gdb/doc/stabs.texinfo @@ -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 -- 2.7.4