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

This commit is contained in:
Peter Oberndorfer 2007-05-22 20:25:03 +02:00 committed by Alexandre Julliard
parent eab168cf9e
commit 0bfb26aa99
2 changed files with 17 additions and 0 deletions

View File

@ -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"

View File

@ -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;