- getSection/getSymbol now returns an ElfSymbol reference. Searching by address now searches if address is within symbol address and symbol address + size. So we can test, if we are *within* a function, object or section and not only at the start address.
21 lines
449 B
C++
21 lines
449 B
C++
#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 Demangler::DEMANGLE_FAILED;
|
|
}
|
|
}
|
|
|
|
} // end of namespace
|