From 052eb24b03ff0a2b32887518395154d4c7351bc2 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 26 Oct 2010 12:55:53 +0200 Subject: [PATCH] winedbg: Don't start another instance of the debugger when it crashes. --- programs/winedbg/winedbg.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c index a649123043a..03bff8c6615 100644 --- a/programs/winedbg/winedbg.c +++ b/programs/winedbg/winedbg.c @@ -603,6 +603,12 @@ void dbg_start_interactive(HANDLE hFile) dbg_save_internal_vars(); } +static LONG CALLBACK top_filter( EXCEPTION_POINTERS *ptr ) +{ + dbg_printf( "winedbg: Internal crash at %p\n", ptr->ExceptionRecord->ExceptionAddress ); + return EXCEPTION_EXECUTE_HANDLER; +} + struct backend_cpu* be_cpu; #ifdef __i386__ extern struct backend_cpu be_i386; @@ -644,6 +650,8 @@ int main(int argc, char** argv) /* Initialize the output */ dbg_houtput = GetStdHandle(STD_OUTPUT_HANDLE); + SetUnhandledExceptionFilter( top_filter ); + /* Initialize internal vars */ if (!dbg_load_internal_vars()) return -1;