You can retrieve the mangled names of exported symbols with the RTVBNDSRC command. To help you find the corresponding demangled names, the runtime library contains a small class hierarchy of functions that you can use to demangle names and examine the resulting parts of the name. The interface is documented in the <demangle.h> header file.
Using the demangling functions, you can write programs to convert a mangled name to a demangled name and to determine characteristics of that name, such as its type qualifiers or scope. For example, given the mangled name of a function, the program returns the demangled name of the function and the names of its qualifiers. If the mangled name refers to a class member, you can determine if it is static, const, or volatile. You can also get the whole text of the mangled name.
To demangle a name, which is represented as a character array, create a dynamic instance of the Name class and provide the character string to the class's constructor. For example, to demangle the name f__1XFi, create:
char *rest; Name *name = Demangle("f__1XFi", rest);
The demangling functions classify names into five categories: function names, member function names, special names, class names, and member variable names. After you construct an instance of class Name, you can use the Kind member function of Name to determine what kind of Name the instance is. Based on the kind of name returned, you can ask for the text of the different parts of the name or of the entire name.
For the mangled name f__1XFi, you can determine:
name->Kind() == MemberFunction ((MemberFunctionName *) name)->Scope()->Text() is "X" ((MemberFunctionName *) name)->RootName() is "f" ((MemberFunctionName *) name)->Text() is "X::f(int)"
If the character string passed to the Name constructor is not a mangled name, the Demangle function returns NULL.
For further details about the demangling functions, refer to the information contained in the demangle.h header file. If you installed ILE C/C++ using default settings, this header file should be in IFS in the /QIBM/include directory and in DM in QSYSINC/H.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.