Added MSVC symbol demangling, switched to LLVM libs for demangling

This commit is contained in:
WerWolv
2020-11-24 18:12:08 +01:00
parent f17d6c2359
commit acc10930c2
5 changed files with 50 additions and 35 deletions

View File

@@ -165,25 +165,6 @@ namespace hex {
}
}
inline std::string demangleItaniumSymbol(const std::string &mangledSymbol) {
size_t length = 0;
int status = 0;
char *demangledSymbol = abi::__cxa_demangle(mangledSymbol.c_str(), nullptr, &length, &status);
if (demangledSymbol == nullptr)
return "< ??? >";
std::string result = demangledSymbol;
free(demangledSymbol);
if (status != 0)
result = "< ??? >";
return result;
}
class ScopeExit {
public:
ScopeExit(std::function<void()> func) : m_func(func) {}

View File

@@ -30,6 +30,11 @@ namespace hex {
std::vector<FoundString> m_foundStrings;
int m_minimumLength = 5;
char *m_filter;
std::string m_selectedString;
std::string m_demangledName;
void createStringContextMenu(const FoundString &foundString);
};
}