From 7ba6502dd90a08a547c29e60432278e28bad8138 Mon Sep 17 00:00:00 2001 From: Glenn Wurster Date: Tue, 23 Aug 2005 10:02:05 +0000 Subject: [PATCH] Don't pass on EH_STACK_INVALID exceptions. --- programs/winedbg/winedbg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c index e4e48158aab..c11df0d4d17 100644 --- a/programs/winedbg/winedbg.c +++ b/programs/winedbg/winedbg.c @@ -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 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance return DBG_CONTINUE; } - if (first_chance && !is_debug && !DBG_IVAR(BreakOnFirstChance)) + if (first_chance && !is_debug && !DBG_IVAR(BreakOnFirstChance) && + !(rec->ExceptionFlags & EH_STACK_INVALID)) { /* pass exception to program except for debug exceptions */ return DBG_EXCEPTION_NOT_HANDLED; @@ -726,6 +727,9 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance break; } } + if( (rec->ExceptionFlags & EH_STACK_INVALID) ) { + dbg_printf( ", invalid program stack" ); + } if (dbg_action_mode == automatic_mode) {