Alexandre Julliard : winedbg: Don' t start another instance of the debugger when it crashes.

Alexandre Julliard julliard at winehq.org
Thu Dec 2 16:30:52 CST 2010


Module: wine
Branch: stable
Commit: 1f7822981bf6bf457dddbb46eecd606c797f7404
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1f7822981bf6bf457dddbb46eecd606c797f7404

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct 26 12:55:53 2010 +0200

winedbg: Don't start another instance of the debugger when it crashes.
(cherry picked from commit 052eb24b03ff0a2b32887518395154d4c7351bc2)

---

 programs/winedbg/winedbg.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c
index 3e64506..a074098 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;
@@ -636,6 +642,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;
 




More information about the wine-cvs mailing list