From f1a071ed8ee03403eb7eafbfc785473850a54479 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 2 Sep 2019 21:06:51 -0400 Subject: [PATCH] mark '$' as valid posix mangling char Fixes #8. --- demumble.cc | 2 +- demumble_test.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/demumble.cc b/demumble.cc index deaea39..aa68e28 100644 --- a/demumble.cc +++ b/demumble.cc @@ -36,7 +36,7 @@ static void print_demangled(const char* format, const char* s) { static bool is_mangle_char_posix(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || c == '_'; + (c >= '0' && c <= '9') || c == '_' || c == '$'; } static bool is_mangle_char_win(char c) { diff --git a/demumble_test.py b/demumble_test.py index 3b35aed..2e0097b 100755 --- a/demumble_test.py +++ b/demumble_test.py @@ -37,6 +37,8 @@ ('demumble -mb < _Z1fv!foo_bar', '"f()" (_Z1fv)\n'), ('demumble --foo < bar', re.compile(".*unrecognized option `--foo'.*")), ('demumble -bx < bar', re.compile(".*unrecognized option `x' in `-bx'.*")), + ('demumble < _ZZ3fooiENK3$_0clEi', + 'foo(int)::$_0::operator()(int) const\n'), ] status = 0