diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-10-27 21:40:36 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-10-27 21:40:36 +0000 |
commit | bb1908342f355179769d22c8f7dc473e93514328 (patch) | |
tree | 58340c72b9006e472d957d460d94c1601ac13f70 /gdb | |
parent | b10f4dd9774e176113d5e7f6ab9746580a0eab30 (diff) | |
download | gdb-bb1908342f355179769d22c8f7dc473e93514328.zip gdb-bb1908342f355179769d22c8f7dc473e93514328.tar.gz gdb-bb1908342f355179769d22c8f7dc473e93514328.tar.bz2 |
* stabs.texinfo (Class Names): New node.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/doc/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/doc/stabs.texinfo | 35 |
2 files changed, 35 insertions, 2 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index a9b7809..ba1d56d 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 682beac..4068254 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: |