demangler

Is there an online name demangler for C++? [closed]

*爱你&永不变心* 提交于 2019-12-28 03:20:19
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . 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? 回答1: I have created such an online serivice: https://demangler.com This is a gcc c++ symbol demangler. You

Is it possible to get the function name from the mangled string

送分小仙女□ 提交于 2019-12-25 18:24:48
问题 This question is a continuation of the following question, where a code to demangle a function-name given by the backtrace function is presented. I wonder whether there is a way to get the name and the namespaces of a callable object . Here we assume that the function does have a name and that it is possible to demangle its name with abi::__cxa_demangle (for example, it's not a lambda function). Furthermore, would it be possible to get a list of the namespaces in which the function is? 来源:

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

无人久伴 提交于 2019-12-17 16:30:59
问题 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 since it could change over time due to new complier versions or new compiler brands being used or at present due to compiling for multiple platforms. Is there a programatic way to get the string that represents a C++ function at runtime so that the

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

南笙酒味 提交于 2019-12-14 01:21:46
问题 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 found: __ZN2nm8RationalIxEC1ERKNS_10RubyObjectE Referenced from: /Users/jwoods/Projects/nmatrix/lib/nmatrix.bundle Expected in: flat namespace and then the same for __ZN2nm7ComplexIfEC1ERKNS_10RubyObjectE . Unfortunately, c++filt doesn't seem to want to

Return type in demangled member function name

耗尽温柔 提交于 2019-12-10 21:11:42
问题 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 <execinfo.h> #include <cxxabi.h> #include <iostream> struct Foo { void operator()() const { constexpr int buf_size = 100; static void *buffer[buf_size]; int nptrs = backtrace(buffer, buf_size); char **strings = backtrace_symbols(buffer, nptrs); for(int i = 0; i < nptrs; ++i) { auto str = std::string(strings[i]); auto first = str

c++filt does not demangle typeid name

馋奶兔 提交于 2019-12-10 13:23:09
问题 I am running a code on GCC C++ compiler, to output the type_info::name: #include <iostream> #include <typeinfo> using namespace std; class shape { protected: int color; public: virtual void draw() = 0; }; class Circle: public shape { protected: int color; public: Circle(int a = 0): color(a) {}; void draw(); }; void Circle::draw() { cout<<"color: "<<color<<'\n'; } class triangle: public shape { protected: int color; public: triangle(int a = 0): color(a) {}; void draw(); }; void triangle::draw(

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

蹲街弑〆低调 提交于 2019-12-07 02:36:01
问题 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 "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -pg") set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} -pg") does not allow gprof to demangle the C++ functions. Any ideas? (I am using C++11) 回答1: Try using: SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") SET

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

半腔热情 提交于 2019-12-05 05:56:00
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 "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -pg") set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} -pg") does not allow gprof to demangle the C++ functions. Any ideas? (I am using C++11) Try using: SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER

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

南楼画角 提交于 2019-11-27 23:24:50
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 since it could change over time due to new complier versions or new compiler brands being used or at present due to compiling for multiple platforms. Is there a programatic way to get the string that represents a C++ function at runtime so that the code is compiler independent? One way to possibly do this would be to call a utility at compile time

Is there an online name demangler for C++? [closed]

孤者浪人 提交于 2019-11-27 10:32:47
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? I have created such an online serivice: http://demangler.com This is a gcc c++ symbol demangler. You just copy a stack trace, or the output of nm into a text box, and it will return the output with the names demangled. @Update: It now demangles MSVC and Java symbols also. This might be a bit late, but I created one, based on this question. It works with the inputs I tried on, supports g++ and