Added copy string and copy demangled string to strings window

This commit is contained in:
WerWolv
2020-11-24 02:59:49 +01:00
parent e21211f3f6
commit f17d6c2359
5 changed files with 45 additions and 17 deletions

View File

@@ -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:

View File

@@ -22,7 +22,7 @@ namespace hex {
private:
char *m_mangledBuffer = nullptr;
char *m_demangledName = nullptr;
std::string m_demangledName;
bool m_asciiTableShowOctal = false;