diff --git a/src/libs/qtcreatorcdbext/eventcallback.cpp b/src/libs/qtcreatorcdbext/eventcallback.cpp index e1db5a5dfe9..d1e8d0e6527 100644 --- a/src/libs/qtcreatorcdbext/eventcallback.cpp +++ b/src/libs/qtcreatorcdbext/eventcallback.cpp @@ -120,9 +120,9 @@ static StopReasonMap breakPointStopReasonParameters(PDEBUG_BREAKPOINT b) if (CIDebugClient *client = ExtensionContext::instance().hookedClient()) { IInterfacePointer dataSpaces(client); if (dataSpaces) { - const std::wstring memoryHex = memoryToHexW(dataSpaces.data(), memoryRange.first, memoryRange.second); + const std::string memoryHex = memoryToHex(dataSpaces.data(), memoryRange.first, memoryRange.second); if (!memoryHex.empty()) - rc.insert(StopReasonMapValue("memory", wStringToString(memoryHex))); + rc.insert(StopReasonMapValue("memory", memoryHex)); } // dataSpaces } // client return rc; diff --git a/src/libs/qtcreatorcdbext/gdbmihelpers.cpp b/src/libs/qtcreatorcdbext/gdbmihelpers.cpp index 17ac20790bd..ca3dd1b1e13 100644 --- a/src/libs/qtcreatorcdbext/gdbmihelpers.cpp +++ b/src/libs/qtcreatorcdbext/gdbmihelpers.cpp @@ -592,17 +592,6 @@ std::string memoryToHex(CIDebugDataSpaces *ds, ULONG64 address, ULONG length, return std::string(); } -std::wstring memoryToHexW(CIDebugDataSpaces *ds, ULONG64 address, ULONG length, - std::string *errorMessage /* = 0 */) -{ - if (const unsigned char *buffer = SymbolGroupValue::readMemory(ds, address, length, errorMessage)) { - const std::wstring hex = dataToHexW(buffer, buffer + length); - delete [] buffer; - return hex; - } - return std::wstring(); -} - // Format stack as GDBMI static StackFrames getStackTrace(CIDebugControl *debugControl, CIDebugSymbols *debugSymbols, @@ -789,9 +778,9 @@ static bool gdbmiFormatBreakpoint(std::ostream &str, // Report the memory of watchpoints for comparing bitfields if (dataSpaces && memoryRange.second > 0) { str << ",size=\"" << memoryRange.second << '"'; - const std::wstring memoryHex = memoryToHexW(dataSpaces, memoryRange.first, memoryRange.second); + const std::string memoryHex = memoryToHex(dataSpaces, memoryRange.first, memoryRange.second); if (!memoryHex.empty()) - str << ",memory=\"" << gdbmiWStringFormat(memoryHex) << '"'; + str << ",memory=\"" << gdbmiStringFormat(memoryHex) << '"'; } } // Got address } // !deferred diff --git a/src/libs/qtcreatorcdbext/gdbmihelpers.h b/src/libs/qtcreatorcdbext/gdbmihelpers.h index 7b313bbf59b..47a02e8da68 100644 --- a/src/libs/qtcreatorcdbext/gdbmihelpers.h +++ b/src/libs/qtcreatorcdbext/gdbmihelpers.h @@ -164,8 +164,6 @@ std::string gdbmiRegisters(CIDebugRegisters *regs, std::string memoryToHex(CIDebugDataSpaces *ds, ULONG64 address, ULONG length, std::string *errorMessage = 0); -std::wstring memoryToHexW(CIDebugDataSpaces *ds, ULONG64 address, ULONG length, - std::string *errorMessage = 0); // Stack helpers StackFrames getStackTrace(CIDebugControl *debugControl, CIDebugSymbols *debugSymbols, unsigned maxFrames, bool *incomplete, std::string *errorMessage);