From: Toni Wilen Date: Sat, 7 Jan 2023 12:35:37 +0000 (+0200) Subject: Do not open debugger console window when dumping m68k status when something bad happened. X-Git-Tag: 41010~27 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=8fa9e539874aea9aa92d2f93d340471e4088f28c;p=francis%2Fwinuae.git Do not open debugger console window when dumping m68k status when something bad happened. --- diff --git a/memory.cpp b/memory.cpp index 53e03847..b0532998 100644 --- a/memory.cpp +++ b/memory.cpp @@ -1175,7 +1175,7 @@ uae_u8 *REGPARAM2 default_xlate (uaecptr addr) uaecptr a3 = m68k_getpc () - 32; write_log (_T("Your Amiga program just did something terribly stupid %08X PC=%08X\n"), addr, M68K_GETPC); if (debugging || DEBUG_STUPID) { - activate_debugger (); + activate_debugger(); m68k_dumpstate(NULL, 0xffffffff); } for (i = 0; i < 10; i++) { @@ -1187,7 +1187,6 @@ uae_u8 *REGPARAM2 default_xlate (uaecptr addr) write_log (_T("\n")); } memory_map_dump(); - m68k_dumpstate(NULL, 0xffffffff); } if (0 || (gary_toenb && (gary_nonrange(addr) || (size > 1 && gary_nonrange(addr + size - 1))))) { hardware_exception2(addr, 0, true, true, size); diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 09b5846f..457ca660 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -7464,7 +7464,9 @@ LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointer int got = 0; uaecptr opc = m68k_getpc (); void *ps = get_real_address (0); - m68k_dumpstate(NULL, 0xffffffff); + if (is_console_open()) { + m68k_dumpstate(NULL, 0xffffffff); + } efix (&ctx->Eax, p, ps, &got); efix (&ctx->Ebx, p, ps, &got); efix (&ctx->Ecx, p, ps, &got); @@ -7502,7 +7504,7 @@ LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointer FreeLibrary (hFaultRepDll ); } #endif - return lRet ; + return lRet; } #endif