Commit 0bfb26aa authored by Peter Oberndorfer's avatar Peter Oberndorfer Committed by Alexandre Julliard

winedbg: Show some info for msvcrt C++ exceptions.

parent eab168cf
......@@ -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"
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment