Peter Oberndorfer : winedbg: Show some info for msvcrt C++ exceptions.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed May 23 08:10:56 CDT 2007
Module: wine
Branch: master
Commit: 0bfb26aa996a618b3160d7944f561353e46a2638
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0bfb26aa996a618b3160d7944f561353e46a2638
Author: Peter Oberndorfer <kumbayo84 at arcor.de>
Date: Tue May 22 20:25:03 2007 +0200
winedbg: Show some info for msvcrt C++ exceptions.
---
programs/winedbg/debugger.h | 9 +++++++++
programs/winedbg/tgt_active.c | 8 ++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h
index 3ad2bd3..e09d5f3 100644
--- a/programs/winedbg/debugger.h
+++ b/programs/winedbg/debugger.h
@@ -141,6 +141,15 @@ struct dbg_breakpoint
struct expr* condition;
};
+/* used for C++ exceptions in msvcrt
+ * parameters:
+ * [0] CXX_FRAME_MAGIC
+ * [1] pointer to exception object
+ * [2] pointer to type
+ */
+#define CXX_EXCEPTION 0xe06d7363
+#define CXX_FRAME_MAGIC 0x19930520
+
/* Wine extension; Windows doesn't have a name for this code. This is an
undocumented exception understood by MS VC debugger, allowing the program
to name a particular thread. Search google.com or deja.com for "0x406d1388"
diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c
index 21e8966..1698201 100644
--- a/programs/winedbg/tgt_active.c
+++ b/programs/winedbg/tgt_active.c
@@ -381,6 +381,14 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
case EXCEPTION_FLT_STACK_CHECK:
dbg_printf("floating point stack check");
break;
+ case CXX_EXCEPTION:
+ if(rec->NumberParameters == 3 && rec->ExceptionInformation[0] == CXX_FRAME_MAGIC)
+ dbg_printf("C++ exception(object = 0x%08lx, type = 0x%08lx)",
+ rec->ExceptionInformation[1], rec->ExceptionInformation[2]);
+ else
+ dbg_printf("C++ exception with strange parameter count %d or magic 0x%08lx",
+ rec->NumberParameters, rec->ExceptionInformation[0]);
+ break;
default:
dbg_printf("0x%08x", rec->ExceptionCode);
break;
More information about the wine-cvs
mailing list