mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
Added MSVC symbol demangling, switched to LLVM libs for demangling
This commit is contained in:
@@ -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) {}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user