Files
fail/src/core/util/Demangler.cc
Martin Hoffmann 4686c27d3d ElfReader: Support for Section and Symbol size.
- 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.
2013-03-04 15:18:52 +01:00

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