From bb1908342f355179769d22c8f7dc473e93514328 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Wed, 27 Oct 1993 21:40:36 +0000 Subject: [PATCH] * stabs.texinfo (Class Names): New node. --- gdb/doc/ChangeLog | 2 ++ gdb/doc/stabs.texinfo | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index a9b78095c83..ba1d56d7946 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,5 +1,7 @@ Wed Oct 27 00:25:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + * stabs.texinfo (Class Names): New node. + * gdb.texinfo (Command Files): Explain order of init file reading. * remote.texi (Bootstrapping): Talk about getting the serial driver diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo index 682beaccd0e..40682541005 100644 --- a/gdb/doc/stabs.texinfo +++ b/gdb/doc/stabs.texinfo @@ -2226,6 +2226,7 @@ Symnum n_type n_othr n_desc n_value n_strx String @chapter GNU C++ Stabs @menu +* Class Names:: C++ class names are both tags and typedefs. * Basic Cplusplus Types:: * Simple Classes:: * Class Instance:: @@ -2257,6 +2258,37 @@ will be followed by a digit, @samp{(}, or @samp{-}, and type attributes never start with those things. @end table +@node Class Names +@section C++ Class Names + +In C++, a class name which is declared with @code{class}, @code{struct}, +or @code{union}, is not only a tag, as in C, but also a type name. Thus +there should be stabs with both @samp{t} and @samp{T} symbol descriptors +(@pxref{Typedefs}). + +To save space, there is a special abbreviation for this case. If the +@samp{T} symbol descriptor is followed by @samp{t}, then the stab +defines both a type name and a tag. + +For example, the C++ code + +@example +struct foo @{int x;@}; +@end example + +can be represented as either + +@example +.stabs "foo:T19=s4x:1,0,32;;",128,0,0,0 # @r{128 is N_LSYM} +.stabs "foo:t19",128,0,0,0 +@end example + +or + +@example +.stabs "foo:Tt19=s4x:1,0,32;;",128,0,0,0 +@end example + @node Basic Cplusplus Types @section Basic Types For C++ @@ -2503,10 +2535,9 @@ functions were publicly accessable. The example that follows contrasts public, protected and privately accessable fields and shows how these protections are encoded in C++ stabs. -@c FIXME: What does "part of the string" mean? Protections for class member data are signified by two characters embedded in the stab defining the class type. These characters are -located after the name: part of the string. @samp{/0} means private, +located after the @samp{name:} part of the string. @samp{/0} means private, @samp{/1} means protected, and @samp{/2} means public. If these characters are omited this means that the member is public. The following C++ source: -- 2.30.2