From 8f6df242c4d66fb4a35d017ec19e858a810e7aae Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 20 Aug 2023 17:08:16 +0200 Subject: [PATCH] Remove: [Win32] (pointer-only) stack trace in crash.log (#11211) It only contains pointers, which nobody can decipher anyway. So instead, just report "Not supported", like other targets do when they can't print a sane stack trace. --- src/os/windows/crashlog_win.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp index 219539f52b..a9fc02209c 100644 --- a/src/os/windows/crashlog_win.cpp +++ b/src/os/windows/crashlog_win.cpp @@ -198,25 +198,7 @@ static void PrintModuleInfo(std::back_insert_iterator &output_itera /* virtual */ void CrashLogWindows::LogStacktrace(std::back_insert_iterator &output_iterator) const { fmt::format_to(output_iterator, "Stack trace:\n"); -#ifdef _M_AMD64 - uint32_t *b = (uint32_t*)ep->ContextRecord->Rsp; -#elif defined(_M_IX86) - uint32_t *b = (uint32_t*)ep->ContextRecord->Esp; -#elif defined(_M_ARM64) - uint32_t *b = (uint32_t*)ep->ContextRecord->Sp; -#endif - for (int j = 0; j != 24; j++) { - for (int i = 0; i != 8; i++) { - if (IsBadReadPtr(b, sizeof(uint32_t))) { - fmt::format_to(output_iterator, " ????????"); // OCR: WAS - , 0); - } else { - fmt::format_to(output_iterator, " {:08X}", *b); - } - b++; - } - fmt::format_to(output_iterator, "\n"); - } - fmt::format_to(output_iterator, "\n"); + fmt::format_to(output_iterator, " Not supported.\n"); } #if defined(_MSC_VER)