Author: greatlrd
Date: Fri Mar 2 22:07:42 2007
New Revision: 25955
URL:
http://svn.reactos.org/svn/reactos?rev=25955&view=rev
Log:
almost every endless loop for pseh are gone.
after I merge down follow changes
some part of 25938 (alex trunk changes)
25953 (dprint msg to detect if pseh goes into endless loop or not)
25915-25917 kjk fix for pseh
Modified:
branches/ros-branch-0_3_1/reactos/include/ndk/asm.h
branches/ros-branch-0_3_1/reactos/include/reactos/libs/pseh/framebased.h
branches/ros-branch-0_3_1/reactos/include/reactos/libs/pseh/framebased/internal.h
branches/ros-branch-0_3_1/reactos/lib/pseh/framebased.c
branches/ros-branch-0_3_1/reactos/ntoskrnl/include/internal/i386/asmmacro.S
Modified: branches/ros-branch-0_3_1/reactos/include/ndk/asm.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/includ…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/include/ndk/asm.h (original)
+++ branches/ros-branch-0_3_1/reactos/include/ndk/asm.h Fri Mar 2 22:07:42 2007
@@ -144,7 +144,7 @@
#define KPRCB_DR2 0x300
#define KPRCB_DR3 0x304
#define KPRCB_DR6 0x308
-#define KPRCB_DR7 0x20C
+#define KPRCB_DR7 0x30C
//
// KPCR Offsets
Modified: branches/ros-branch-0_3_1/reactos/include/reactos/libs/pseh/framebased.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/includ…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/include/reactos/libs/pseh/framebased.h (original)
+++ branches/ros-branch-0_3_1/reactos/include/reactos/libs/pseh/framebased.h Fri Mar 2
22:07:42 2007
@@ -29,7 +29,7 @@
#ifndef offsetof
# include <stddef.h>
#endif
-
+unsigned long __cdecl DbgPrint(const char * format, ...);
/*
Fall back to non-optimal, non-native NLG implementation for environments
without their own (e.g., currently, kernel-mode ReactOS/Windows). THIS IS NOT
@@ -46,6 +46,12 @@
# define _SEHJmpBuf_t jmp_buf
#endif
+#ifdef __cplusplus
+# define _SEH_INIT_CONST static const
+#else
+# define _SEH_INIT_CONST register const
+#endif
+
typedef struct __SEHFrame
{
_SEHPortableFrame_t SEH_Header;
@@ -65,9 +71,10 @@
_SEHPortableTryLevel_t * trylevel
)
{
- _SEHTryLevel_t * mytrylevel;
- mytrylevel = _SEH_CONTAINING_RECORD(trylevel, _SEHTryLevel_t, ST_Header);
- _SEHLongJmp(mytrylevel->ST_JmpBuf, 1);
+ // DbgPrint("_SEHCompilerSpecificHandler(%p)\n", trylevel);
+ _SEHTryLevel_t * mytrylevel;
+ mytrylevel = _SEH_CONTAINING_RECORD(trylevel, _SEHTryLevel_t, ST_Header);
+ _SEHLongJmp(mytrylevel->ST_JmpBuf, 1);
}
static const int _SEHScopeKind = 1;
@@ -193,7 +200,7 @@
_SEHEnterTry(&_SEHTryLevel.ST_Header); \
\
{ \
- static const int _SEHScopeKind = 0; \
+ _SEH_INIT_CONST int _SEHScopeKind = 0; \
(void)_SEHScopeKind; \
\
if(_SEHSetJmp(_SEHTryLevel.ST_JmpBuf) == 0) \
@@ -232,35 +239,29 @@
/* New syntax */
-#ifdef __cplusplus
-# define _SEH2_INIT_CONST static const
-#else
-# define _SEH2_INIT_CONST register const
-#endif
-
#define _SEH_LEAVE break
#define _SEH_TRY \
{ \
- _SEH2_INIT_CONST int _SEH2TopTryLevel = (_SEHScopeKind != 0); \
- _SEHPortableFrame_t * const _SEH2CurPortableFrame = _SEHPortableFrame; \
+ _SEH_INIT_CONST int _SEHTopTryLevel = (_SEHScopeKind != 0); \
+ _SEHPortableFrame_t * const _SEHCurPortableFrame = _SEHPortableFrame; \
\
{ \
- static const int _SEHScopeKind = 0; \
- register int _SEH2State = 0; \
- register int _SEH2Handle = 0; \
- _SEHFrame_t _SEH2Frame; \
- _SEHTryLevel_t _SEH2TryLevel; \
+ _SEH_INIT_CONST int _SEHScopeKind = 0; \
+ volatile register int _SEHState = 0; \
+ register int _SEHHandle = 0; \
+ _SEHFrame_t _SEHFrame; \
+ _SEHTryLevel_t _SEHTryLevel; \
_SEHPortableFrame_t * const _SEHPortableFrame = \
- _SEH2TopTryLevel ? &_SEH2Frame.SEH_Header : _SEH2CurPortableFrame; \
+ _SEHTopTryLevel ? &_SEHFrame.SEH_Header : _SEHCurPortableFrame; \
\
(void)_SEHScopeKind; \
(void)_SEHPortableFrame; \
- (void)_SEH2Handle; \
+ (void)_SEHHandle; \
\
for(;;) \
{ \
- if(_SEH2State) \
+ if(_SEHState) \
{ \
for(;;) \
{ \
@@ -278,22 +279,23 @@
{ \
_SEH_DECLARE_HANDLERS((FILTER_), 0); \
\
- _SEH2TryLevel.ST_Header.SPT_Handlers = &_SEHHandlers; \
- \
- if(_SEH2TopTryLevel) \
+ _SEHTryLevel.ST_Header.SPT_Handlers = &_SEHHandlers; \
+ \
+ if(_SEHTopTryLevel) \
{ \
if(&_SEHLocals != _SEHDummyLocals) \
- _SEH2Frame.SEH_Locals = &_SEHLocals; \
- \
- _SEH2Frame.SEH_Header.SPF_Handler = _SEHCompilerSpecificHandler; \
- _SEHEnterFrame(&_SEH2Frame.SEH_Header, &_SEH2TryLevel.ST_Header); \
+ _SEHFrame.SEH_Locals = &_SEHLocals; \
+ \
+ _SEH_EnableTracing(_SEH_DO_DEFAULT_TRACING); \
+ _SEHFrame.SEH_Header.SPF_Handler = _SEHCompilerSpecificHandler; \
+ _SEHEnterFrame(&_SEHFrame.SEH_Header, &_SEHTryLevel.ST_Header); \
} \
else \
- _SEHEnterTry(&_SEH2TryLevel.ST_Header); \
- \
- if((_SEH2Handle = _SEHSetJmp(_SEH2TryLevel.ST_JmpBuf)) == 0) \
- { \
- _SEH2State++; \
+ _SEHEnterTry(&_SEHTryLevel.ST_Header); \
+ \
+ if((_SEHHandle = _SEHSetJmp(_SEHTryLevel.ST_JmpBuf)) == 0) \
+ { \
+ ++ _SEHState; \
continue; \
} \
else \
@@ -307,7 +309,7 @@
\
_SEHLeave(); \
\
- if(_SEH2Handle) \
+ if(_SEHHandle) \
{
#define _SEH_FINALLY(FINALLY_) \
@@ -323,27 +325,29 @@
{ \
_SEH_DECLARE_HANDLERS(0, (FINALLY_)); \
\
- _SEH2TryLevel.ST_Header.SPT_Handlers = &_SEHHandlers; \
- \
- if(_SEH2TopTryLevel) \
+ _SEHTryLevel.ST_Header.SPT_Handlers = &_SEHHandlers; \
+ \
+ if(_SEHTopTryLevel) \
{ \
if(&_SEHLocals != _SEHDummyLocals) \
- _SEH2Frame.SEH_Locals = &_SEHLocals; \
- \
- _SEH2Frame.SEH_Header.SPF_Handler = 0; \
- _SEHEnterFrame(&_SEH2Frame.SEH_Header, &_SEH2TryLevel.ST_Header); \
+ _SEHFrame.SEH_Locals = &_SEHLocals; \
+ \
+ _SEH_EnableTracing(_SEH_DO_DEFAULT_TRACING); \
+ _SEHFrame.SEH_Header.SPF_Handler = 0; \
+ _SEHEnterFrame(&_SEHFrame.SEH_Header, &_SEHTryLevel.ST_Header); \
} \
else \
- _SEHEnterTry(&_SEH2TryLevel.ST_Header); \
- \
- ++ _SEH2State; \
+ _SEHEnterTry(&_SEHTryLevel.ST_Header); \
+ \
+ ++ _SEHState; \
continue; \
} \
\
break; \
} \
\
- (FINALLY_)(&_SEH2Frame.SEH_Header); \
+ (FINALLY_)(&_SEHFrame.SEH_Header); \
+ \
if(0) \
{
@@ -358,6 +362,9 @@
#define _SEH_GetExceptionPointers _SEHX_GetExceptionPointers
#define _SEH_AbnormalTermination _SEHX_AbnormalTermination
+#define _SEH_EnableTracing(LEVEL_) ((void)(_SEHPortableFrame->SPF_Tracing =
(LEVEL_)))
+#define _SEH_DisableTracing() ((void)(_SEHPortableFrame->SPF_Tracing =
_SEH_DO_TRACE_NONE))
+
#endif
/* EOF */
Modified:
branches/ros-branch-0_3_1/reactos/include/reactos/libs/pseh/framebased/internal.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/includ…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/include/reactos/libs/pseh/framebased/internal.h
(original)
+++ branches/ros-branch-0_3_1/reactos/include/reactos/libs/pseh/framebased/internal.h Fri
Mar 2 22:07:42 2007
@@ -22,6 +22,23 @@
#ifndef KJK_PSEH_FRAMEBASED_INTERNAL_H_
#define KJK_PSEH_FRAMEBASED_INTERNAL_H_
+
+#define _SEH_DO_TRACE_ENTER_LEAVE (1 << 0)
+#define _SEH_DO_TRACE_EXCEPTION_RECORD (1 << 1)
+#define _SEH_DO_TRACE_CONTEXT (1 << 2)
+#define _SEH_DO_TRACE_UNWIND (1 << 3)
+#define _SEH_DO_TRACE_TRYLEVEL (1 << 4)
+#define _SEH_DO_TRACE_CALL_FILTER (1 << 5)
+#define _SEH_DO_TRACE_FILTER (1 << 6)
+#define _SEH_DO_TRACE_CALL_HANDLER (1 << 7)
+#define _SEH_DO_TRACE_CALL_FINALLY (1 << 8)
+
+#define _SEH_DO_TRACE_NONE (0)
+#define _SEH_DO_TRACE_ALL (-1)
+
+#ifndef _SEH_DO_DEFAULT_TRACING
+#define _SEH_DO_DEFAULT_TRACING _SEH_DO_TRACE_NONE
+#endif
struct _EXCEPTION_RECORD;
struct _EXCEPTION_POINTERS;
@@ -81,6 +98,7 @@
unsigned long SPF_Code;
_SEHHandler_t SPF_Handler;
_SEHPortableTryLevel_t * SPF_TopTryLevel;
+ int SPF_Tracing;
}
_SEHPortableFrame_t;
Modified: branches/ros-branch-0_3_1/reactos/lib/pseh/framebased.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/lib/ps…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/lib/pseh/framebased.c (original)
+++ branches/ros-branch-0_3_1/reactos/lib/pseh/framebased.c Fri Mar 2 22:07:42 2007
@@ -31,6 +31,248 @@
#include <excpt.h>
+/* Tracing */
+#ifdef _SEH_ENABLE_TRACE
+extern unsigned long __cdecl DbgPrint(const char * format, ...);
+
+#define _SEH_TRACE_HEADER_(FRAME_) \
+ DbgPrint("[PSEH:%p]%s:%d:", FRAME_, __FILE__, __LINE__);
+
+#define _SEH_TRACE_TRAILER_ \
+ DbgPrint("\n");
+
+#define _SEH_FILTER_RET_STRING_(RET_) \
+ (((int)(RET_) < 0) ? "_SEH_CONTINUE_EXECUTION" : (((int)(RET_) > 0) ?
"_SEH_EXECUTE_HANDLER" : "_SEH_CONTINUE_SEARCH"))
+
+#define _SEH_TRACE_LINE_(FRAME_, ARGS_) \
+{ \
+ _SEH_TRACE_HEADER_(FRAME_); \
+ DbgPrint ARGS_; \
+ _SEH_TRACE_TRAILER_; \
+}
+
+#define _SEH_TRACE_ENTER(FRAME_, FUNCNAME_, ARGS_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_ENTER_LEAVE) \
+ { \
+ _SEH_TRACE_HEADER_(FRAME_); \
+ DbgPrint(">>> %s(", (FUNCNAME_)); \
+ DbgPrint ARGS_; \
+ DbgPrint(")"); \
+ _SEH_TRACE_TRAILER_; \
+ } \
+}
+
+#define _SEH_TRACE_LEAVE(FRAME_, FUNCNAME_, ARGS_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_ENTER_LEAVE) \
+ { \
+ _SEH_TRACE_HEADER_(FRAME_); \
+ DbgPrint("<<< %s => ", (FUNCNAME_)); \
+ DbgPrint ARGS_; \
+ _SEH_TRACE_TRAILER_; \
+ } \
+}
+
+#define _SEH_TRACE_EXCEPTION_RECORD(FRAME_, ER_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_EXCEPTION_RECORD) \
+ { \
+ _SEH_TRACE_LINE_ \
+ ( \
+ (FRAME_), \
+ ( \
+ "ExceptionRecord %p = { ExceptionCode : %08X, ExceptionFlags : %08X,
ExceptionRecord : %p, ExceptionAddress : %p }", \
+ (ER_), \
+ (ER_)->ExceptionCode, \
+ (ER_)->ExceptionFlags, \
+ (ER_)->ExceptionRecord, \
+ (ER_)->ExceptionAddress \
+ ) \
+ ); \
+ } \
+}
+
+#ifdef _X86_
+#define _SEH_TRACE_CONTEXT(FRAME_, CONTEXT_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_CONTEXT) \
+ { \
+ if(((CONTEXT_)->ContextFlags & CONTEXT_INTEGER) == CONTEXT_INTEGER) \
+ { \
+ _SEH_TRACE_LINE_ \
+ ( \
+ (FRAME_), \
+ ( \
+ "eax=%08X ebx=%08X ecx=%08X edx=%08X esi=%08X edi=%08X", \
+ (CONTEXT_)->Eax, \
+ (CONTEXT_)->Ebx, \
+ (CONTEXT_)->Ecx, \
+ (CONTEXT_)->Edx, \
+ (CONTEXT_)->Esi, \
+ (CONTEXT_)->Edi \
+ ) \
+ ); \
+ } \
+ \
+ if(((CONTEXT_)->ContextFlags & CONTEXT_CONTROL) == CONTEXT_CONTROL) \
+ { \
+ _SEH_TRACE_LINE_ \
+ ( \
+ (FRAME_), \
+ ( \
+ "eip=%08X esp=%08X ebp=%08X efl=%08X cs=%08X ss=%08X", \
+ (CONTEXT_)->Eip, \
+ (CONTEXT_)->Esp, \
+ (CONTEXT_)->Ebp, \
+ (CONTEXT_)->EFlags, \
+ (CONTEXT_)->SegCs, \
+ (CONTEXT_)->SegSs \
+ ) \
+ ); \
+ } \
+ \
+ if(((CONTEXT_)->ContextFlags & CONTEXT_SEGMENTS) == CONTEXT_SEGMENTS) \
+ { \
+ _SEH_TRACE_LINE_ \
+ ( \
+ (FRAME_), \
+ ( \
+ "ds=%08X es=%08X fs=%08X gs=%08X", \
+ (CONTEXT_)->SegDs, \
+ (CONTEXT_)->SegEs, \
+ (CONTEXT_)->SegFs, \
+ (CONTEXT_)->SegGs \
+ ) \
+ ); \
+ } \
+ } \
+}
+#else
+#error Unsupported platform.
+#endif
+
+#define _SEH_TRACE_UNWIND(FRAME_, ARGS_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_UNWIND) \
+ { \
+ _SEH_TRACE_LINE_((FRAME_), ARGS_); \
+ } \
+}
+
+#define _SEH_TRACE_TRYLEVEL(FRAME_, TRYLEVEL_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_TRYLEVEL) \
+ { \
+ _SEH_TRACE_LINE_((FRAME_), ("trylevel %p, filter %p", (TRYLEVEL_),
(TRYLEVEL_)->SPT_Handlers->SH_Filter)); \
+ } \
+}
+
+#define _SEH_TRACE_ENTER_CALL_FILTER(FRAME_, TRYLEVEL_, ER_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_CALL_FILTER) \
+ { \
+ _SEH_TRACE_LINE_ \
+ ( \
+ (FRAME_), \
+ ( \
+ "trylevel %p, calling filter %p, ExceptionCode %08X", \
+ (TRYLEVEL_), \
+ (TRYLEVEL_)->SPT_Handlers->SH_Filter, \
+ (ER_)->ExceptionCode \
+ ) \
+ ); \
+ } \
+}
+
+#define _SEH_TRACE_LEAVE_CALL_FILTER(FRAME_, TRYLEVEL_, RET_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_CALL_FILTER) \
+ { \
+ _SEH_TRACE_LINE_ \
+ ( \
+ (FRAME_), \
+ ( \
+ "trylevel %p, filter %p => %s", \
+ (TRYLEVEL_), \
+ (TRYLEVEL_)->SPT_Handlers->SH_Filter, \
+ _SEH_FILTER_RET_STRING_(RET_) \
+ ) \
+ ); \
+ } \
+}
+
+#define _SEH_TRACE_FILTER(FRAME_, TRYLEVEL_, RET_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_FILTER) \
+ { \
+ _SEH_TRACE_LINE_ \
+ ( \
+ (FRAME_), \
+ ( \
+ "trylevel %p => %s", \
+ (TRYLEVEL_), \
+ _SEH_FILTER_RET_STRING_(RET_) \
+ ) \
+ ); \
+ } \
+}
+
+#define _SEH_TRACE_ENTER_CALL_HANDLER(FRAME_, TRYLEVEL_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_CALL_HANDLER) \
+ { \
+ _SEH_TRACE_LINE_((FRAME_), ("trylevel %p, handling", (TRYLEVEL_))); \
+ } \
+}
+
+#define _SEH_TRACE_ENTER_CALL_FINALLY(FRAME_, TRYLEVEL_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_CALL_FINALLY) \
+ { \
+ _SEH_TRACE_LINE_ \
+ ( \
+ (FRAME_), \
+ ( \
+ "trylevel %p, calling exit routine %p", \
+ (TRYLEVEL_), \
+ (TRYLEVEL_)->SPT_Handlers->SH_Finally \
+ ) \
+ ); \
+ } \
+}
+
+#define _SEH_TRACE_LEAVE_CALL_FINALLY(FRAME_, TRYLEVEL_) \
+{ \
+ if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_CALL_FINALLY) \
+ { \
+ _SEH_TRACE_LINE_ \
+ ( \
+ (FRAME_), \
+ ( \
+ "trylevel %p, exit routine %p returned", \
+ (TRYLEVEL_), \
+ (TRYLEVEL_)->SPT_Handlers->SH_Finally \
+ ) \
+ ); \
+ } \
+}
+
+#else
+#define _SEH_TRACE_ENTER(FRAME_, FUNCNAME_, ARGS_)
+#define _SEH_TRACE_LEAVE(FRAME_, FUNCNAME_, ARGS_)
+#define _SEH_TRACE_EXCEPTION_RECORD(FRAME_, ER_)
+#define _SEH_TRACE_CONTEXT(FRAME_, CONTEXT_)
+#define _SEH_TRACE_UNWIND(FRAME_, ARGS_)
+#define _SEH_TRACE_TRYLEVEL(FRAME_, TRYLEVEL_)
+#define _SEH_TRACE_ENTER_CALL_FILTER(FRAME_, TRYLEVEL_, ER_)
+#define _SEH_TRACE_LEAVE_CALL_FILTER(FRAME_, TRYLEVEL_, RET_)
+#define _SEH_TRACE_FILTER(FRAME_, TRYLEVEL_, RET_)
+#define _SEH_TRACE_ENTER_CALL_HANDLER(FRAME_, TRYLEVEL_)
+#define _SEH_TRACE_ENTER_CALL_FINALLY(FRAME_, TRYLEVEL_)
+#define _SEH_TRACE_LEAVE_CALL_FINALLY(FRAME_, TRYLEVEL_)
+#endif
+
/* Assembly helpers, see i386/framebased.asm */
extern void __cdecl _SEHCleanHandlerEnvironment(void);
extern struct __SEHRegistration * __cdecl _SEHRegisterFrame(_SEHRegistration_t *);
@@ -49,6 +291,8 @@
)
{
_SEHPortableTryLevel_t * trylevel;
+
+ _SEH_TRACE_UNWIND(frame, ("enter local unwind from %p to %p",
frame->SPF_TopTryLevel, dsttrylevel));
for
(
@@ -64,8 +308,14 @@
pfnFinally = trylevel->SPT_Handlers->SH_Finally;
if(pfnFinally)
+ {
+ _SEH_TRACE_ENTER_CALL_FINALLY(frame, trylevel);
pfnFinally(frame);
+ _SEH_TRACE_LEAVE_CALL_FINALLY(frame, trylevel);
+ }
}
+
+ _SEH_TRACE_UNWIND(frame, ("leave local unwind from %p to %p",
frame->SPF_TopTryLevel, dsttrylevel));
}
static void __cdecl _SEHCallHandler
@@ -76,7 +326,9 @@
{
_SEHGlobalUnwind(frame);
_SEHLocalUnwind(frame, trylevel);
+ _SEH_TRACE_ENTER_CALL_HANDLER(frame, trylevel);
frame->SPF_Handler(trylevel);
+ /* ASSERT(0); */
}
static int __cdecl _SEHFrameHandler
@@ -93,9 +345,29 @@
frame = EstablisherFrame;
+ _SEH_TRACE_ENTER
+ (
+ frame,
+ "_SEHFrameHandler",
+ (
+ "%p, %p, %p, %p",
+ ExceptionRecord,
+ EstablisherFrame,
+ ContextRecord,
+ DispatcherContext
+ )
+ );
+
+ _SEH_TRACE_EXCEPTION_RECORD(frame, ExceptionRecord);
+ _SEH_TRACE_CONTEXT(frame, ContextRecord);
+
/* Unwinding */
if(ExceptionRecord->ExceptionFlags & (4 | 2))
+ {
+ _SEH_TRACE_UNWIND(frame, ("enter forced unwind"));
_SEHLocalUnwind(frame, NULL);
+ _SEH_TRACE_UNWIND(frame, ("leave forced unwind"));
+ }
/* Handling */
else
{
@@ -115,6 +387,8 @@
)
{
_SEHFilter_t pfnFilter = trylevel->SPT_Handlers->SH_Filter;
+
+ _SEH_TRACE_TRYLEVEL(frame, trylevel);
switch((UINT_PTR)pfnFilter)
{
@@ -135,7 +409,9 @@
ep.ExceptionRecord = ExceptionRecord;
ep.ContextRecord = ContextRecord;
+ _SEH_TRACE_ENTER_CALL_FILTER(frame, trylevel, ExceptionRecord);
ret = pfnFilter(&ep, frame);
+ _SEH_TRACE_LEAVE_CALL_FILTER(frame, trylevel, ret);
}
else
ret = _SEH_CONTINUE_SEARCH;
@@ -144,9 +420,14 @@
}
}
+ _SEH_TRACE_FILTER(frame, trylevel, ret);
+
/* _SEH_CONTINUE_EXECUTION */
if(ret < 0)
+ {
+ _SEH_TRACE_LEAVE(frame, "_SEHFrameHandler",
("ExceptionContinueExecution"));
return ExceptionContinueExecution;
+ }
/* _SEH_EXECUTE_HANDLER */
else if(ret > 0)
_SEHCallHandler(frame, trylevel);
@@ -158,6 +439,7 @@
/* FALLTHROUGH */
}
+ _SEH_TRACE_LEAVE(frame, "_SEHFrameHandler",
("ExceptionContinueSearch"));
return ExceptionContinueSearch;
}
Modified: branches/ros-branch-0_3_1/reactos/ntoskrnl/include/internal/i386/asmmacro.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/ntoskr…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/ntoskrnl/include/internal/i386/asmmacro.S
(original)
+++ branches/ros-branch-0_3_1/reactos/ntoskrnl/include/internal/i386/asmmacro.S Fri Mar 2
22:07:42 2007
@@ -265,9 +265,9 @@
mov [ebp+KTRAP_FRAME_DR2], edi
/* Get DR3, 6, 7 */
- mov ebx, dr0
- mov ecx, dr1
- mov edi, dr2
+ mov ebx, dr3
+ mov ecx, dr6
+ mov edi, dr7
/* Save them */
mov [ebp+KTRAP_FRAME_DR3], ebx