15 #ifndef TRACETOOLS__UTILS_HPP_
16 #define TRACETOOLS__UTILS_HPP_
24 #define TRACETOOLS_SYMBOL_UNKNOWN "UNKNOWN"
26 #ifndef TRACETOOLS_DISABLED
38 const char * demangle_symbol(
const char * mangled);
44 const char * get_symbol_funcptr(
void * funcptr);
56 template<
typename T,
typename ... U>
59 typedef T (fnType)(U...);
60 fnType ** fnPointer = f.template target<fnType *>();
62 if (fnPointer !=
nullptr) {
63 void * funcptr =
reinterpret_cast<void *
>(*fnPointer);
64 return detail::get_symbol_funcptr(funcptr);
67 return detail::demangle_symbol(f.target_type().name());
80 return detail::demangle_symbol(
typeid(l).name());
85 [[deprecated(
"use tracetools::detail::demangle_symbol")]]
86 inline const char * _demangle_symbol(
const char * mangled)
88 return tracetools::detail::demangle_symbol(mangled);
91 [[deprecated(
"use tracetools::detail::get_symbol_funcptr")]]
92 inline const char * _get_symbol_funcptr(
void * funcptr)
94 return tracetools::detail::get_symbol_funcptr(funcptr);
97 template<
typename T,
typename ... U>
98 [[deprecated(
"use tracetools::get_symbol")]]
105 [[deprecated(
"use tracetools::get_symbol")]]
108 return tracetools::get_symbol<L>(l);
111 #endif // TRACETOOLS_DISABLED
113 #endif // TRACETOOLS__UTILS_HPP_