ElfReader: Added support for de/mangled symbols

See vezs-example experiment for usage.



git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1985 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hoffmann
2012-12-21 12:12:25 +00:00
parent e5323abcf9
commit 4051c0f4e9
6 changed files with 169 additions and 50 deletions

View File

@ -0,0 +1,20 @@
#include "Demangler.hpp"
#define HAVE_DECL_BASENAME 1
#include <demangle.h>
#include <stdio.h>
namespace fail {
const std::string Demangler::DEMANGLE_FAILED = "[Demangler] Demangle failed.";
std::string Demangler::demangle(const std::string& name){
const char* res = cplus_demangle(name.c_str(), 0);
if(res != NULL){
return std::string(res);
}else{
return DEMANGLE_FAILED;
}
}
} // end of namespace