Index: dll/win32/kernel32/client/except.c =================================================================== --- dll/win32/kernel32/client/except.c (révision 65078) +++ dll/win32/kernel32/client/except.c (copie de travail) @@ -75,6 +75,14 @@ PEXCEPTION_RECORD ExceptionRecord = ExceptionInfo->ExceptionRecord; PCONTEXT ContextRecord = ExceptionInfo->ContextRecord; + /* Attempt to hack around bad calls of UnhandledExceptionFilter */ + if ((ULONG_PTR)(ExceptionRecord->ExceptionAddress) != (ULONG_PTR)(ContextRecord->Eip)) + { + // See: https://www.mail-archive.com/ros-dev@reactos.org/msg02197.html + DPRINT1("Bogus context detected!!\n"); // , using context record HACK!!\n"); + // ContextRecord = (PCONTEXT) ExceptionInfo[1].ExceptionRecord; + } + /* Print a stack trace. */ DbgPrint("Unhandled exception\n"); DbgPrint("ExceptionCode: %8x\n", ExceptionRecord->ExceptionCode); @@ -368,9 +376,20 @@ /* Better handling of Delphi Exceptions... a ReactOS Hack */ if (dwExceptionCode == 0xeedface || dwExceptionCode == 0xeedfade) { - DPRINT1("Delphi Exception at address: %p\n", ExceptionRecord.ExceptionInformation[0]); - DPRINT1("Exception-Object: %p\n", ExceptionRecord.ExceptionInformation[1]); - DPRINT1("Exception text: %s\n", ExceptionRecord.ExceptionInformation[2]); + PSTR ExceptionText = ExceptionRecord.ExceptionInformation[2]; + PSTR SuppInfo = ExceptionRecord.ExceptionInformation[3]; + + DPRINT1("\n" + "Delphi Exception 0x%X at address: 0x%p\n" + "Exception object : 0x%p\n" + "Exception text : '%s'\n" + "Other info at 0x%p : '%s'\n" + "\n", + dwExceptionCode, + ExceptionRecord.ExceptionInformation[0], + ExceptionRecord.ExceptionInformation[1], + ExceptionText ? ExceptionText : "", + SuppInfo, SuppInfo ? SuppInfo : ""); } /* Trace the wine special error and show the modulename and functionname */ @@ -379,8 +398,12 @@ /* Numbers of parameter must be equal to two */ if (ExceptionRecord.NumberParameters == 2) { - DPRINT1("Missing function in : %s\n", ExceptionRecord.ExceptionInformation[0]); - DPRINT1("with the functionname : %s\n", ExceptionRecord.ExceptionInformation[1]); + DPRINT1("\n" + "Missing function in : %s\n" + "with the functionname : %s\n" + "\n", + ExceptionRecord.ExceptionInformation[0], + ExceptionRecord.ExceptionInformation[1]); } }