add -m flag that prints only the match
2 files changed
tree: dbb33556a615f01ff96e37e7da9261aa2ef8f27b
  1. third_party/
  2. CMakeLists.txt
  3. demumble.cc
  4. demumble_test.py
  5. README.md
README.md

demumble

demumble demangles both POSIX and Visual Studio symbols. It runs on both POSIX and Windows.

$ ./demumble _Z4funcPci
func(char*, int)
$ ./demumble "?Fx_i@@YAHP6AHH@Z@Z"
int __cdecl Fx_i(int (__cdecl*)(int))

Build instructions

Use cmake to build: cmake -G Ninja && ninja

cxa_demangle.cpp needs more C++11 than Visual Studio 2013 supports, so to build on Windows you need to use clang-cl as C++ compiler like so:

cmake -G Ninja -DCMAKE_CXX_COMPILER=path/to/llvm-build/bin/clang-cl.exe