GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ELFTC_DEMANGLE(3) FreeBSD Library Functions Manual ELFTC_DEMANGLE(3)

elftc_demangle
demangle a C++ name

library “libelftc”

#include <libelftc.h>

int
elftc_demangle(const char *encodedname, char *buffer, size_t bufsize, unsigned int flags);

Function elftc_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:

The encoding style used by compilers adhering to the conventions of the C++ Annotated Reference Manual.
The encoding style by GNU C++ version 2.
The encoding style by GNU C++ version 3 and later.

Argument flags may be zero, in which case the function will attempt to guess the encoding scheme from the contents of encodedname.

Function elftc_demangle() returns 0 on success. In case of an error it returns -1 and sets the errno variable.

To 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);

Function elftc_demangle() may fail with the following errors:
[]
Argument encodedname was not a valid encoded name.
[]
The output buffer specified by arguments buffer and bufsize was too small to hold the decoded function prototype.

elf(3), elf_strptr(3)
August 24, 2011 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.