Questions tagged [demangler]

38 questions
123
votes
5 answers

Is there an online name demangler for C++?

I'm getting a fairly long and confusing link error, and would love it if I could just paste it into some textbox on some website and have the names un-mangled for me. Does anyone know of such a service?
Roman Starkov
  • 59,298
  • 38
  • 251
  • 324
55
votes
5 answers

What is Linux utility to mangle a C++ symbol name?

I have c++filt command to demangle a symbol, what is the tool to do the opposite and mangle a symbol name? This would be useful if I were to want to call dlsym() on a mangled C++ function name. I'd rather not hard code the name mangling in the code…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
14
votes
1 answer

How to set flags of g++ using cmake such that gprof can demangle?

How do I set the gprof flags for the compiler and linker of GNU g++ in a CMakeLists.txt? My current approach, set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -pg") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO…
Max Flow
  • 607
  • 7
  • 15
9
votes
1 answer

libswiftDemangle.so on Linux

While compiling Swift on Mac machine, there is a dynamic library libswiftDemangle.dylib created. I need the dynamic library created on Linux machine as well, however, the dynamic library isn't created after a compilation of a source code. The file…
agoldis
  • 1,067
  • 16
  • 28
9
votes
2 answers

c++filt does not demangle typeid name

I am running a code on GCC C++ compiler, to output the type_info::name: #include #include using namespace std; class shape { protected: int color; public: virtual void draw() = 0; }; class Circle: public…
Stephen Jacob
  • 889
  • 1
  • 15
  • 33
7
votes
1 answer

Ambiguity of de-mangled C++ symbols

_ZNSaIwEC1Ev _ZNSaIwEC2Ev These two C++ symbols differ but are demangled (using C++filt or similar utility) into the same form: std::allocator::allocator() std::allocator::allocator() Why so? Could it be a demangler's defect or…
def
  • 521
  • 4
  • 16
4
votes
2 answers

abi::__cxa_demangle -- why buffer needs to be `malloc`-ed?

The documentation of abi::__cxa_demangle (such as https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.3/a01696.html) specifies that the second argument, char * output_buffer, need to be malloc-ed. That means that a character buffer…
Arun
  • 19,750
  • 10
  • 51
  • 60
4
votes
1 answer

Program crashes in debug mode: "unable to demangle"?

In Eclipse CDT my code does not run in debug mode. I get the following message: /build/gdb-HnfxP_/gdb-7.10/gdb/cp-support.c:1595: demangler-warning: unable to demangle…
edvin
  • 43
  • 4
4
votes
3 answers

Windows demangling library

I'm looking for an open source library to do Windows executable symbol name demangling. Does such a thing exist or must I use the Microsoft libraries?
user368980
  • 41
  • 2
4
votes
1 answer

How to demangle std::string as std::string

I have been using some demangling code already for while to help with some debugging without having to write thousands of lines with dynamic casts or having to implement virtual functions which return the class name. template
JVApen
  • 11,008
  • 5
  • 31
  • 67
4
votes
0 answers

Demangling D Symbols when Profiling D Programs with perf

I've just discovered the fantastic tool perf on Linux. I profiled a D program with this but when I call perf report the symbols are not demangled. I'm aware of ddemangle but this only works in batch-processing mode. I could always dump the output…
Nordlöw
  • 11,838
  • 10
  • 52
  • 99
4
votes
1 answer

What is a "destructor group" symbol in gcc name mangling

https://stackoverflow.com/a/6614369/1091587 has a quick rundown of the destructor types (D0, D1, D2) that appear when you read the symbol table of a program compiled using “gcc3”-type name mangling. There are also corresponding constructors…
jørgensen
  • 10,149
  • 2
  • 20
  • 27
3
votes
2 answers

abi::__cxa_demangle cannot demangle symbols?

I am unsure why this fails to demangle symbols: #include void _debugBacktrace(code_part part) { #if defined(WZ_OS_LINUX) && defined(__GLIBC__) void *btv[20]; unsigned num = backtrace(btv, sizeof(btv) / sizeof(*btv)); char…
dgan
  • 1,349
  • 1
  • 15
  • 28
3
votes
1 answer

Return type in demangled member function name

What is the reason for the g++ abi::__cxa_demangle function to not return the return value for member functions? Here's a working example of this behavior #include #include #include struct Foo { void…
Lezkus
  • 160
  • 1
  • 12
3
votes
1 answer

Is it possible to demangle C++ symbols by hand?

I'm getting some errors like this: dyld: lazy symbol binding failed: Symbol not found: __ZN2nm8RationalIxEC1ERKNS_10RubyObjectE Referenced from: /Users/jwoods/Projects/nmatrix/lib/nmatrix.bundle Expected in: flat namespace dyld: Symbol not…
Translunar
  • 3,739
  • 33
  • 55
1
2 3