From dfd3d4ada2a73bab1a161a873d8cb601bbc18cd0 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 25 Nov 2000 23:56:20 +0000 Subject: [PATCH] Moved GET_IP out of winnt.h. --- dlls/kernel/debugger.c | 2 +- dlls/ntdll/exception.c | 11 ++++++++++- include/winnt.h | 11 ----------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/dlls/kernel/debugger.c b/dlls/kernel/debugger.c index f3d5df6853..ee0a0c2475 100644 --- a/dlls/kernel/debugger.c +++ b/dlls/kernel/debugger.c @@ -207,7 +207,7 @@ void WINAPI DebugBreak16( CONTEXT86 *context ) rec.ExceptionCode = EXCEPTION_BREAKPOINT; rec.ExceptionFlags = 0; rec.ExceptionRecord = NULL; - rec.ExceptionAddress = GET_IP(context); + rec.ExceptionAddress = (LPVOID)context->Eip; rec.NumberParameters = 0; NtRaiseException( &rec, context, TRUE ); #endif /* defined(__i386__) */ diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c index 0782e017d3..29f3ce82a3 100644 --- a/dlls/ntdll/exception.c +++ b/dlls/ntdll/exception.c @@ -27,7 +27,16 @@ typedef struct EXCEPTION_FRAME *prevFrame; } EXC_NESTED_FRAME; - +#ifdef __i386__ +# define GET_IP(context) ((LPVOID)(context)->Eip) +#endif +#ifdef __sparc__ +# define GET_IP(context) ((LPVOID)(context)->pc) +#endif +#ifndef GET_IP +# error You must define GET_IP for this CPU +#endif + /******************************************************************* * EXC_RaiseHandler * diff --git a/include/winnt.h b/include/winnt.h index 9e22299938..05433b0704 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -793,17 +793,6 @@ typedef HANDLE *PHANDLE; #error You need to define DEFINE_REGS_ENTRYPOINT macros for your CPU #endif -#ifdef __i386__ -# define GET_IP(context) ((LPVOID)(context)->Eip) -#endif -#ifdef __sparc__ -# define GET_IP(context) ((LPVOID)(context)->pc) -#endif - -#if !defined(GET_IP) && !defined(RC_INVOKED) -# error You must define GET_IP for this CPU -#endif - /* Constructor functions */ #ifdef __GNUC__