[winedbg] Don't ever pass a NONCONTINUABLE exception

Glenn Wurster gwurster at scs.carleton.ca
Sat Aug 20 17:40:49 CDT 2005


Changelog:
   Don't pass on non-continuable exceptions.

Glenn.

Index: programs/winedbg/winedbg.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/winedbg.c,v
retrieving revision 1.37
diff -u -r1.37 winedbg.c
--- programs/winedbg/winedbg.c	7 Jul 2005 12:08:42 -0000	1.37
+++ programs/winedbg/winedbg.c	20 Aug 2005 22:35:16 -0000
@@ -38,7 +38,7 @@
  *        for that)
  *      + set a mode where winedbg would start (postmortem debugging) from a minidump
  * - CPU adherence
- *      + we always assume the stack grows has an i386 (ie downwards)
+ *      + we always assume the stack grows as on i386 (ie downwards)
  * - UI
  *      + enable back the limited output (depth of structure printing and number of 
  *        lines)
@@ -609,7 +609,8 @@
         return DBG_CONTINUE;
     }
 
-    if (first_chance && !is_debug && !DBG_IVAR(BreakOnFirstChance))
+    if (first_chance && !is_debug && !DBG_IVAR(BreakOnFirstChance) &&
+	!(rec->ExceptionFlags & EH_NONCONTINUABLE))
     {
         /* pass exception to program except for debug exceptions */
         return DBG_EXCEPTION_NOT_HANDLED;
@@ -618,8 +619,14 @@
     if (!is_debug)
     {
         /* print some infos */
-        dbg_printf("%s: ",
-                   first_chance ? "First chance exception" : "Unhandled exception");
+        if (rec->ExceptionFlags & EH_NONCONTINUABLE) {
+            dbg_printf("Non-continuable exception: ");
+	} else if (first_chance) {
+            dbg_printf("First-chance exception: ");
+	} else {
+            dbg_printf("Unhandled exception: ");
+	}
+
         switch (rec->ExceptionCode)
         {
         case EXCEPTION_INT_DIVIDE_BY_ZERO:



More information about the wine-patches mailing list