libstdc++
cxxabi.h File Reference

Go to the source code of this file.

Classes

class  __gnu_cxx::recursive_init_error
 

Namespaces

 __gnu_cxx
 
 abi
 

Typedefs

typedef __cxa_cdtor_return_type(* __cxxabiv1::__cxa_cdtor_type) (void *)
 

Functions

__cxa_dependent_exception * __cxxabiv1::__cxa_allocate_dependent_exception () noexcept
 
void * __cxxabiv1::__cxa_allocate_exception (size_t) noexcept
 
int __cxxabiv1::__cxa_atexit (void(*)(void *), void *, void *) noexcept
 
void __cxxabiv1::__cxa_bad_cast () __attribute__((__noreturn__))
 
void __cxxabiv1::__cxa_bad_typeid () __attribute__((__noreturn__))
 
void * __cxxabiv1::__cxa_begin_catch (void *) noexcept
 
std::type_info__cxxabiv1::__cxa_current_exception_type () noexcept __attribute__((__pure__))
 
void __cxxabiv1::__cxa_deleted_virtual (void) __attribute__((__noreturn__))
 
char * __cxxabiv1::__cxa_demangle (const char *__mangled_name, char *__output_buffer, size_t *__length, int *__status)
 
void __cxxabiv1::__cxa_end_catch ()
 
int __cxxabiv1::__cxa_finalize (void *)
 
void __cxxabiv1::__cxa_free_dependent_exception (__cxa_dependent_exception *) noexcept
 
void __cxxabiv1::__cxa_free_exception (void *) noexcept
 
void * __cxxabiv1::__cxa_get_exception_ptr (void *) noexcept __attribute__((__pure__))
 
__cxa_eh_globals * __cxxabiv1::__cxa_get_globals () noexcept __attribute__((__const__))
 
__cxa_eh_globals * __cxxabiv1::__cxa_get_globals_fast () noexcept __attribute__((__const__))
 
void __cxxabiv1::__cxa_guard_abort (__guard *) noexcept
 
int __cxxabiv1::__cxa_guard_acquire (__guard *)
 
void __cxxabiv1::__cxa_guard_release (__guard *) noexcept
 
void __cxxabiv1::__cxa_pure_virtual (void) __attribute__((__noreturn__))
 
void __cxxabiv1::__cxa_rethrow () __attribute__((__noreturn__))
 
int __cxxabiv1::__cxa_thread_atexit (void(*)(void *), void *, void *) noexcept
 
void __cxxabiv1::__cxa_throw (void *, std::type_info *, void( *)(void *)) __attribute__((__noreturn__))
 
void __cxxabiv1::__cxa_throw_bad_array_new_length () __attribute__((__noreturn__))
 
__cxa_vec_ctor_return_type __cxxabiv1::__cxa_vec_cctor (void *__dest_array, void *__src_array, size_t __element_count, size_t __element_size, __cxa_cdtor_return_type(*__constructor)(void *, void *), __cxa_cdtor_type __destructor)
 
void __cxxabiv1::__cxa_vec_cleanup (void *__array_address, size_t __element_count, size_t __s, __cxa_cdtor_type __destructor) noexcept
 
__cxa_vec_ctor_return_type __cxxabiv1::__cxa_vec_ctor (void *__array_address, size_t __element_count, size_t __element_size, __cxa_cdtor_type __constructor, __cxa_cdtor_type __destructor)
 
void __cxxabiv1::__cxa_vec_delete (void *__array_address, size_t __element_size, size_t __padding_size, __cxa_cdtor_type __destructor)
 
void __cxxabiv1::__cxa_vec_delete2 (void *__array_address, size_t __element_size, size_t __padding_size, __cxa_cdtor_type __destructor, void(*__dealloc)(void *))
 
void __cxxabiv1::__cxa_vec_delete3 (void *__array_address, size_t __element_size, size_t __padding_size, __cxa_cdtor_type __destructor, void(*__dealloc)(void *, size_t))
 
void __cxxabiv1::__cxa_vec_dtor (void *__array_address, size_t __element_count, size_t __element_size, __cxa_cdtor_type __destructor)
 
void * __cxxabiv1::__cxa_vec_new (size_t __element_count, size_t __element_size, size_t __padding_size, __cxa_cdtor_type __constructor, __cxa_cdtor_type __destructor)
 
void * __cxxabiv1::__cxa_vec_new2 (size_t __element_count, size_t __element_size, size_t __padding_size, __cxa_cdtor_type __constructor, __cxa_cdtor_type __destructor, void *(*__alloc)(size_t), void(*__dealloc)(void *))
 
void * __cxxabiv1::__cxa_vec_new3 (size_t __element_count, size_t __element_size, size_t __padding_size, __cxa_cdtor_type __constructor, __cxa_cdtor_type __destructor, void *(*__alloc)(size_t), void(*__dealloc)(void *, size_t))
 
void * __cxxabiv1::__dynamic_cast (const void *__src_ptr, const __class_type_info *__src_type, const __class_type_info *__dst_type, ptrdiff_t __src2dst)
 

Detailed Description

The header provides an interface to the C++ ABI.

Definition in file cxxabi.h.

Function Documentation

char* __cxxabiv1::__cxa_demangle ( const char *  __mangled_name,
char *  __output_buffer,
size_t *  __length,
int *  __status 
)

Demangling routine. ABI-mandated entry point in the C++ runtime library for demangling.

Parameters
__mangled_nameA NUL-terminated character string containing the name to be demangled.
__output_bufferA region of memory, allocated with malloc, of *__length bytes, into which the demangled name is stored. If __output_buffer is not long enough, it is expanded using realloc. __output_buffer may instead be NULL; in that case, the demangled name is placed in a region of memory allocated with malloc.
__lengthIf __length is non-NULL, the length of the buffer containing the demangled name is placed in *__length.
__status*__status is set to one of the following values: 0: The demangling operation succeeded. -1: A memory allocation failure occurred. -2: mangled_name is not a valid name under the C++ ABI mangling rules. -3: One of the arguments is invalid.
Returns
A pointer to the start of the NUL-terminated demangled name, or NULL if the demangling fails. The caller is responsible for deallocating this memory using free.

The demangling is performed using the C++ ABI mangling rules, with GNU extensions. For example, this function is used in __gnu_cxx::__verbose_terminate_handler.

See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch39.html for other examples of use.

Note
The same demangling functionality is available via libiberty (<libiberty/demangle.h> and libiberty.a) in GCC 3.1 and later, but that requires explicit installation (–enable-install-libiberty) and uses a different API, although the ABI is unchanged.