|
NAMEelftc_demangle —
demangle a C++ name
LIBRARYlibrary “libelftc”SYNOPSIS#include <libelftc.h>
int
DESCRIPTIONFunctionelftc_demangle () decodes a symbol name encoded
according to the type encoding rules for the C++ language and returns a string
denoting an equivalent C++ prototype.
Argument encodedname specifies the encoded symbol name. Argument buffer denotes a programmer-specified area to place the prototype string in. Argument bufsize specifies the size of the programmer-specified area. Argument flags specifies the encoding style in use for argument encodedname. Supported encoding styles are:
Argument flags may be zero, in which case the function will attempt to guess the encoding scheme from the contents of encodedname. RETURN VALUESFunctionelftc_demangle () returns 0 on success. In case
of an error it returns -1 and sets the errno variable.
EXAMPLESTo decode a name that uses an unknown encoding style use:char buffer[1024]; const char *funcname; funcname = ...; /* points to string to be demangled */ if (elftc_demangle(funcname, buffer, sizeof(buffer), 0) == 0) printf("Demangled name: %\n", buffer); else perror("Cannot demangle %s", funcname); ERRORSFunctionelftc_demangle () may fail with the following
errors:
SEE ALSOelf(3), elf_strptr(3)
Visit the GSP FreeBSD Man Page Interface. |