2

(similar to this question: C++ Name Mangling Library for Python)

I'm trying to experiment with some static analysis tools in Java that operate on C++ disassembly. I know there's "c++filt", but I'd like to avoid interfacing with an external program, and also c++filt only does demangling, whereas I'd like to do both mangling and demangling.

Is there a Java library that would have methods similar to this:

interface CMethod
{
    String getName();
    String getClassName();
    List<String> getArguments();
    String getReturnType();
}

interface Mangler
{
    CMethod demangle(String mangledName);
    String mangle(CMethod method);        
}
Community
  • 1
  • 1
Jason S
  • 184,598
  • 164
  • 608
  • 970
  • Are you aware that name mangling is entirely implementation dependent? It may change drastically, depending even on the target *ABI*. –  Mar 17 '12 at 23:04
  • yes, that's why I declared Mangler as an interface, presumably with several implementations – Jason S Mar 17 '12 at 23:22

0 Answers0