This hack^H^H^H^Hpatch stops winedbg crashing on loading several (C++?) DLLs. In particular, those used by Microsoft Visual C++ IDE. I doubt this will be applied, but it's worth a shot! Changelog: - Add exception handler for protection when parsing DLLs which don't conform to the expected format
Index: wine/programs/winedbg/msc.c =================================================================== RCS file: /home/wine/wine/programs/winedbg/msc.c,v retrieving revision 1.1 diff -u -r1.1 msc.c --- wine/programs/winedbg/msc.c 13 Sep 2002 17:54:28 -0000 1.1 +++ wine/programs/winedbg/msc.c 4 Dec 2002 22:37:18 -0000 @@ -34,6 +34,8 @@ #include <string.h> #include <unistd.h> +#include "wine/exception.h" +#include "msvcrt/excpt.h" #ifndef PATH_MAX #define PATH_MAX MAX_PATH #endif @@ -58,6 +60,11 @@ } MSC_DBG_INFO; +static WINE_EXCEPTION_FILTER(page_fault) +{ + return GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH; +} + /*======================================================================== * Debug file access helper routines */ @@ -258,6 +265,8 @@ new_value.cookie = DV_TARGET; new_value.type = NULL; + __TRY + { for(i=0; i < coff->NumberOfSymbols; i++ ) { coff_sym = coff_symbols + i; @@ -468,6 +477,12 @@ i += naux; } + } + __EXCEPT(page_fault) + { + return DIL_ERROR; + } + __ENDTRY /* * OK, we now should have a list of files, and we should have a list