Chapter Contents

Previous

Next
Interpreting C++ Demangled Names

Special Conventions Used in Demangled Names

This section describes the special conventions that are used in demangled names. You can use it as an aid to determine the specific identifier to which a demangled name refers.

Certain SAS/C keywords may be replaced in a name with shorter abbreviations. The keywords and their abbreviations are listed in Keywords and Their Abbreviations.

Keywords and Their Abbreviations
Keyword Abbreviation
signed
S
unsigned
U
const
C
volatile
V
_ _local
_L
_ _asm
_A
_ _ref
_R
_ _ibmos
_I
_ _cobol
_C
_ _fortran
_FO
_ _pascal
_PA
_ _pli
_PL
_ _foreign
_FR

Long identifier names may be truncated in the middle. This truncation means that the first and last parts of the identifier will be printed with the middle characters replaced by "...". For instance, if necessary, the name ComputeCumulativeLoss may be printed as Compute...iveLoss.

When a name has multiple levels of nesting, the inner scope identifiers may be removed and replaced with an ellipsis. For example, the name IO_Namespace::FileManager::UtilityOperations::Reposition(file) might be truncated to IO_Namespace::...::Reposition(file).

If a function or function type has a long list of arguments, one or more of the arguments may be omitted. This is indicated by an ellipsis after the last argument printed, followed by the number of omitted arguments. If the function has a variable number of arguments, another ellipsis will be generated after the number of arguments. For instance, the name Interpolate(formula,double,...3...) indicates a function with 5 arguments, the first two of which are a formula and a double, plus a varying number of additional arguments. In addition to omitting arguments to save space, the demangler also omits arguments for nested functions because overloading based on argument types for nested function pointer arguments is almost never used.

Names involving nested templates may be displayed with some of the template levels omitted. For example, the name f(name1<name2,<name3<name4<int,name5*> >,name6>) could be truncated to f(name1<name2,<name3<>,name6>), or even to f(name1<>) if some of the names were very long. It is also possible, though not common, for some of the arguments in a template to be omitted. In this case, an ellipsis indicates the presence of one or more additional template arguments. For example, the name of f above might be shortened to f(name1<name2,...>).

When a template argument is an integral constant, it is printed in the form type(value), for example, long(14). The type will either be a built-in integer type or an enumeration type.

When a template argument is a member data pointer, the mangled name does not contain enough information for the demangler to print the name of the member addressed. Instead, one of the following notations is used: class::offset indicates a pointer to a member at the indicated offset from the class, while class::*(0) indicates a null member pointer. In the following example, the demangled name for the function named confusing will be confusing(&my_class::+4):

class myclass {
public:
   int a,b;
};
 
template  <int myclass::*> class strange {
   /* template body */
};
 
void confusing(strange<&my_class::b>);

The C++ language does not have a notation to explicitly specify an unnamed namespace. A mangled name for a function or identifier in an unnamed namespace is printed as if the name of the unnamed namespace was {unnamed}. An example is the name {unnamed}::myclass::invert(int). If compression of such a name is needed, {unnamed} may be further compressed to {0}.

As noted above, a conversion operator may be displayed in a form that is not valid C++. In some cases, the name of the conversion operator may be so long that it cannot be truncated without being misleading. In this case, a complex type in the operator name may be replaced by the word typedef. For example, the demangled name classname::operator typedef *() is a conversion operator that converts to a pointer type, where the name of the type pointed to was too long to print.

Sometimes, a demangled name will refer to an object constructed by the translator that does not correspond to any object declared by the user. Such names generally have the form {name[index]}, where name is a descriptive name and index is a unique number identifying the object. For example, a translator-generated virtual function table for a class named GraphicalObject could be GraphicalObject::{VTable[1]}.

Some names generated by the translator are given names relative to the compilation. The demangled name in this case will have a qualifier that resembles a class or namespace name, but ends in an @. For example, the name REPORTR@::_ _init(void) refers to a translator-generated initialization function for a compilation whose sname (or section name) was specified as REPORTR.

When demangled names are generated on the mainframe, brackets in the name ( [ and ] ) are replaced with digraphs ( (| and |) ), since the brackets are often not printable on mainframe I/O devices.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.