are any number of type attributes. Each one starts with @samp{@@} and
ends with @samp{;}. Debuggers, including AIX's dbx and GDB 4.10, skip
any type attributes they do not recognize. GDB 4.9 and other versions
-of dbx may not do this. Because of a conflict with C++
+of dbx may not do this. Because of a conflict with C@t{++}
(@pxref{Cplusplus}), new attributes should not be defined which begin
with a digit, @samp{(}, or @samp{-}; GDB may be unable to distinguish
-those from the C++ type descriptor @samp{@@}. The attributes are:
+those from the C@t{++} type descriptor @samp{@@}. The attributes are:
@table @code
@item a@var{boundary}
include the directory in which the source was compiled, in a second
@code{N_SO} symbol preceding the one containing the file name. This
symbol can be distinguished by the fact that it ends in a slash. Code
-from the @code{cfront} C++ compiler can have additional @code{N_SO} symbols for
+from the @code{cfront} C@t{++} compiler can have additional @code{N_SO} symbols for
nonexistent source files after the @code{N_SO} for the real source file;
these are believed to contain no useful information.
@samp{s} for a structure tag, @samp{u} for a union tag, or @samp{e} for
a enumerator tag, followed by the name of the tag, followed by @samp{:}.
If the name contains @samp{::} between a @samp{<} and @samp{>} pair (for
-C++ templates), such a @samp{::} does not end the name---only a single
+C@t{++} templates), such a @samp{::} does not end the name---only a single
@samp{:} ends the name; see @ref{Nested Symbols}.
For example, the following C declarations:
the field is an element of. So the definition of structure type 16
contains a type definition for an element which is a pointer to type 16.
-If a field is a static member (this is a C++ feature in which a single
+If a field is a static member (this is a C@t{++} feature in which a single
variable appears to be a field of every structure of a given type) it
still starts out with the field name, a colon, and the type, but then
instead of a comma, bit position, comma, and bit size, there is a colon
followed by the name of the variable which each such field refers to.
-If the structure has methods (a C++ feature), they follow the non-method
+If the structure has methods (a C@t{++} feature), they follow the non-method
fields; see @ref{Cplusplus}.
@node Typedefs
@end example
@node Cplusplus
-@chapter GNU C++ Stabs
+@chapter GNU C@t{++} Stabs
@menu
* Class Names:: C++ class names are both tags and typedefs.
@end menu
@node Class Names
-@section C++ Class Names
+@section C@t{++} Class Names
-In C++, a class name which is declared with @code{class}, @code{struct},
+In C@t{++}, 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}).
@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
+For example, the C@t{++} code
@example
struct foo @{int x;@};
@node Nested Symbols
@section Defining a Symbol Within Another Type
-In C++, a symbol (such as a type name) can be defined within another type.
+In C@t{++}, a symbol (such as a type name) can be defined within another type.
@c FIXME: Needs example.
In stabs, this is sometimes represented by making the name of a symbol
symbol descriptor, and @samp{5=*6} is the type information.
@node Basic Cplusplus Types
-@section Basic Types For C++
+@section Basic Types For C@t{++}
<< the examples that follow are based on a01.C >>
-C++ adds two more builtin types to the set defined for C. These are
+C@t{++} adds two more builtin types to the set defined for C. These are
the unknown type and the vtable record type. The unknown type, type
16, is defined in terms of itself like the void type.
<< In boilerplate $vtbl_ptr_type, what are the fields delta,
index, and delta2 used for? >>
-This basic type is present in all C++ programs even if there are no
+This basic type is present in all C@t{++} programs even if there are no
virtual methods defined.
@display
@node Simple Classes
@section Simple Class Definition
-The stabs describing C++ language features are an extension of the
-stabs describing C. Stabs representing C++ class types elaborate
+The stabs describing C@t{++} language features are an extension of the
+stabs describing C. Stabs representing C@t{++} class types elaborate
extensively on the stab format used to describe structure types in C.
Stabs representing class type variables look just like stabs
representing C language variables.
that the class is defined at file scope. If it were, then the @code{N_LSYM}
would signify a local variable.
-A stab describing a C++ class type is similar in format to a stab
+A stab describing a C@t{++} class type is similar in format to a stab
describing a C struct, with each class member shown as a field in the
structure. The part of the struct format describing fields is
-expanded to include extra information relevant to C++ class members.
+expanded to include extra information relevant to C@t{++} class members.
In addition, if the class has multiple base classes or virtual
functions the struct format outside of the field parts is also
augmented.
-In this simple example the field part of the C++ class stab
+In this simple example the field part of the C@t{++} class stab
representing member data looks just like the field part of a C struct
stab. The section on protections describes how its format is
sometimes extended for member data.
-The field part of a C++ class stab representing a member function
+The field part of a C@t{++} class stab representing a member function
differs substantially from the field part of a C struct stab. It
still begins with @samp{name:} but then goes on to define a new type number
for the member function, describe its return type, its argument types,
The next part of the method description represents the arguments to the
method, preceded by a colon and ending with a semi-colon. The types of
the arguments are expressed in the same way argument types are expressed
-in C++ name mangling. In this example an @code{int} and a @code{char}
+in C@t{++} name mangling. In this example an @code{int} and a @code{char}
map to @samp{ic}.
This is followed by a number, a letter, and an asterisk or period,
@node Class Instance
@section Class Instance
-As shown above, describing even a simple C++ class definition is
+As shown above, describing even a simple C@t{++} class definition is
accomplished by massively extending the stab format used in C to
describe structure types. However, once the class is defined, C stabs
with no modifications can be used to describe class instances. The
@node Methods
@section Method Definition
-The class definition shown above declares Ameth. The C++ source below
+The class definition shown above declares Ameth. The C@t{++} source below
defines Ameth:
@example
by type information for the class (or union), a comma, and type
information for the member data.
-The following C++ source:
+The following C@t{++} source:
@smallexample
typedef int A::*int_in_a;
Note that there is a conflict between this and type attributes
(@pxref{String Field}); both use type descriptor @samp{@@}.
-Fortunately, the @samp{@@} type descriptor used in this C++ sense always
+Fortunately, the @samp{@@} type descriptor used in this C@t{++} sense always
will be followed by a digit, @samp{(}, or @samp{-}, and type attributes
never start with those things.
In the simple class definition shown above all member data and
functions were publicly accessible. The example that follows
contrasts public, protected and privately accessible fields and shows
-how these protections are encoded in C++ stabs.
+how these protections are encoded in C@t{++} stabs.
If the character following the @samp{@var{field-name}:} part of the
string is @samp{/}, then the next character is the visibility. @samp{0}
Visibility @samp{9} is not supported by GDB 4.11; this should be fixed
in the next GDB release.
-The following C++ source:
+The following C@t{++} source:
@example
class vis @{
Protections for member functions are signified by one digit embedded in
the field part of the stab describing the method. The digit is 0 if
-private, 1 if protected and 2 if public. Consider the C++ class
+private, 1 if protected and 2 if public. Consider the C@t{++} class
definition below:
@example
occupying 32 bits.
The second field in the class struct is not explicitly defined by the
-C++ class definition but is implied by the fact that the class
+C@t{++} class definition but is implied by the fact that the class
contains a virtual method. This field is the vtable pointer. The
name of the vtable pointer field starts with @samp{$vf} and continues with a
type reference to the class it is part of. In this example the type
Type 22 is the vtable itself, which is defined as an array, indexed by
a range of integers between 0 and 1, and whose elements are of type
-17. Type 17 was the vtable record type defined by the boilerplate C++
+17. Type 17 was the vtable record type defined by the boilerplate C@t{++}
type definitions, as shown earlier.
The bit offset of the vtable pointer field is 32. The number of bits
@node Inheritance
@section Inheritance
-Stabs describing C++ derived classes include additional sections that
+Stabs describing C@t{++} derived classes include additional sections that
describe the inheritance hierarchy of the class. A derived class stab
also encodes the number of base classes. For each base class it tells
if the base class is virtual or not, and if the inheritance is private
Function start/body/end line numbers (Solaris2).
@item 0x50 N_EHDECL
-GNU C++ exception variable; see @ref{N_EHDECL}.
+GNU C@t{++} exception variable; see @ref{N_EHDECL}.
@item 0x50 N_MOD2
Modula2 info "for imc" (according to Ultrix V4.0); see @ref{N_MOD2}.
@item 0x54 N_CATCH
-GNU C++ @code{catch} clause; see @ref{N_CATCH}.
+GNU C@t{++} @code{catch} clause; see @ref{N_CATCH}.
@item 0x60 N_SSYM
Structure of union element; see @ref{N_SSYM}.
Variable on the stack; see @ref{Stack Variables}.
@item :
-C++ nested symbol; see @xref{Nested Symbols}.
+C@t{++} nested symbol; see @xref{Nested Symbols}.
@item a
Parameter passed by reference in register; see @ref{Reference Parameters}.
@item C
Conformant array bound (Pascal, maybe other languages); @ref{Conformant
-Arrays}. Name of a caught exception (GNU C++). These can be
+Arrays}. Name of a caught exception (GNU C@t{++}). These can be
distinguished because the latter uses @code{N_CATCH} and the former uses
another symbol type.
Reference to builtin type; see @ref{Negative Type Numbers}.
@item #
-Method (C++); see @ref{Method Type Descriptor}.
+Method (C@t{++}); see @ref{Method Type Descriptor}.
@item *
Pointer; see @ref{Miscellaneous Types}.
@item &
-Reference (C++).
+Reference (C@t{++}).
@item @@
Type Attributes (AIX); see @ref{String Field}. Member (class and variable)
-type (GNU C++); see @ref{Member Type Descriptor}.
+type (GNU C@t{++}); see @ref{Member Type Descriptor}.
@item a
Array; see @ref{Arrays}.
Cross-reference; see @ref{Cross-References}.
@item Y
-Used by IBM's xlC C++ compiler (for structures, I think).
+Used by IBM's xlC C@t{++} compiler (for structures, I think).
@item z
gstring; see @ref{Strings}.
@deffn @code{.stabs} N_EHDECL
@findex N_EHDECL
-GNU C++ exception variable <<?>>.
+GNU C@t{++} exception variable <<?>>.
"@var{string} is variable name"
@deffn @code{.stabn} N_CATCH
@findex N_CATCH
-GNU C++ @code{catch} clause
+GNU C@t{++} @code{catch} clause
-GNU C++ @code{catch} clause. The value is its address. The desc field
+GNU C@t{++} @code{catch} clause. The value is its address. The desc field
is nonzero if this entry is immediately followed by a @code{CAUGHT} stab
saying what exception was caught. Multiple @code{CAUGHT} stabs means
that multiple exceptions can be caught here. If desc is 0, it means all