Author: hbelusca
Date: Fri Aug 28 14:01:58 2015
New Revision: 68848
URL:
http://svn.reactos.org/svn/reactos?rev=68848&view=rev
Log:
[NTOS]
Fix x64 compilation:
- Some KDBG symbols for win32k debugging are defined only in x86 platform when _WINKD_ is
disabled.
- KdSetOwedBreakpoints is defined only if _WINKD_ is enabled, addendum for x64 to r68842.
Modified:
trunk/reactos/ntoskrnl/include/internal/kd.h
trunk/reactos/ntoskrnl/kd/kdmain.c
trunk/reactos/ntoskrnl/ke/amd64/trap.S
trunk/reactos/ntoskrnl/ke/i386/traphdlr.c
Modified: trunk/reactos/ntoskrnl/include/internal/kd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/kd.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/kd.h [iso-8859-1] Fri Aug 28 14:01:58 2015
@@ -354,7 +354,7 @@
#endif
-#if DBG
+#if DBG && defined(_M_IX86) && !defined(_WINKD_) // See
ke/i386/traphdlr.c
#define ID_Win32PreServiceHook 'WSH0'
#define ID_Win32PostServiceHook 'WSH1'
typedef void (NTAPI *PKDBG_PRESERVICEHOOK)(ULONG, PULONG_PTR);
Modified: trunk/reactos/ntoskrnl/kd/kdmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=6…
==============================================================================
--- trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] Fri Aug 28 14:01:58 2015
@@ -26,8 +26,8 @@
typedef struct
{
- ULONG ComponentId;
- ULONG Level;
+ ULONG ComponentId;
+ ULONG Level;
} KD_COMPONENT_DATA;
#define MAX_KD_COMPONENT_TABLE_ENTRIES 128
KD_COMPONENT_DATA KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES];
@@ -74,6 +74,7 @@
break;
}
+#if defined(_M_IX86) && !defined(_WINKD_) // See ke/i386/traphdlr.c
/* Register a debug callback */
case 'CsoR':
{
@@ -90,6 +91,7 @@
}
break;
}
+#endif
/* Special case for stack frame dumps */
case 'DsoR':
Modified: trunk/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/trap.S?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Fri Aug 28 14:01:58 2015
@@ -15,13 +15,17 @@
EXTERN FrLdrDbgPrint:DWORD
EXTERN KeBugCheckWithTf:PROC
EXTERN MmAccessFault:PROC
-EXTERN KdSetOwedBreakpoints:PROC
EXTERN KiSystemFatalException:PROC
EXTERN KiNpxNotAvailableFaultHandler:PROC
EXTERN KiGeneralProtectionFaultHandler:PROC
EXTERN KiXmmExceptionHandler:PROC
EXTERN KiDeliverApc:PROC
EXTERN KiDpcInterruptHandler:PROC
+
+#ifdef _WINKD_
+EXTERN KdSetOwedBreakpoints:PROC
+#endif
+
/* GLOBALS *******************************************************************/
@@ -509,16 +513,19 @@
/* Check for success */
test eax, eax
+#ifndef _WINKD_
+ jge PageFaultReturn
+#else
jl PageFaultError
- /*
- * We succeeded. Check whether the kernel debugger has
- * owed breakpoints to be inserted, then return.
- */
+ /* Check whether the kernel debugger has owed breakpoints to be inserted */
call KdSetOwedBreakpoints
+ /* We succeeded, return */
jmp PageFaultReturn
PageFaultError:
+#endif
+
/* Disable interrupts again for the debugger */
cli
Modified: trunk/reactos/ntoskrnl/ke/i386/traphdlr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/traphdlr.…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Fri Aug 28 14:01:58 2015
@@ -49,7 +49,7 @@
};
PFAST_SYSTEM_CALL_EXIT KiFastCallExitHandler;
-#if DBG && !defined(_WINKD_)
+#if DBG && defined(_M_IX86) && !defined(_WINKD_)
PKDBG_PRESERVICEHOOK KeWin32PreServiceHook = NULL;
PKDBG_POSTSERVICEHOOK KeWin32PostServiceHook = NULL;
#endif
@@ -1278,12 +1278,10 @@
if (NT_SUCCESS(Status))
{
#ifdef _WINKD_
- /*
- * We succeeded. Check whether the kernel debugger has
- * owed breakpoints to be inserted, then return.
- */
+ /* Check whether the kernel debugger has owed breakpoints to be inserted */
KdSetOwedBreakpoints();
#endif
+ /* We succeeded, return */
KiEoiHelper(TrapFrame);
}