mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
Added copy string and copy demangled string to strings window
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <winsock.h>
|
||||
#include <cxxabi.h>
|
||||
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
@@ -163,6 +165,24 @@ 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:
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace hex {
|
||||
|
||||
private:
|
||||
char *m_mangledBuffer = nullptr;
|
||||
char *m_demangledName = nullptr;
|
||||
std::string m_demangledName;
|
||||
|
||||
bool m_asciiTableShowOctal = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user