From a3bf8905341580cb19d997ae4a20eae5171a2bf0 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Mon, 25 Apr 2005 18:31:20 +0000 Subject: [PATCH] Merge in wrappers with DBG setting as requested svn path=/trunk/; revision=14805 --- reactos/config | 2 +- reactos/ntoskrnl/Makefile | 5 +++++ reactos/ntoskrnl/include/internal/kd.h | 4 +--- reactos/ntoskrnl/kd/kdinit.c | 8 ++------ 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/reactos/config b/reactos/config index c1faa2f73de..dab9da167e8 100644 --- a/reactos/config +++ b/reactos/config @@ -23,9 +23,9 @@ KDBG := 0 # # Whether to compile for debugging +# Enabling this enables ASSERTS, GDB and Special Debug Routines # DBG := 0 -GDB := 1 # # Whether to compile a multiprocessor or single processor version diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index f5fe3df955f..533a59365b4 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -332,8 +332,13 @@ OBJECTS_KD = \ kd/kdinit.o \ kd/kdmain.o \ kd/kdio.o \ + +ifeq ($(DBG), 1) +OBJECTS_KD := \ + $(OBJECTS_KD) \ kd/wrappers/gdbstub.o \ kd/wrappers/bochs.o +endif # User-Mode Debugging (Dbgk) OBJECTS_DBGK = \ diff --git a/reactos/ntoskrnl/include/internal/kd.h b/reactos/ntoskrnl/include/internal/kd.h index e4f222505a0..ce5e0df5493 100644 --- a/reactos/ntoskrnl/include/internal/kd.h +++ b/reactos/ntoskrnl/include/internal/kd.h @@ -12,10 +12,8 @@ struct _KD_DISPATCH_TABLE; -#ifdef GDB +#ifdef DBG #include "kdgdb.h" -#endif -#ifdef BOCHS #include "kdbochs.h" #endif diff --git a/reactos/ntoskrnl/kd/kdinit.c b/reactos/ntoskrnl/kd/kdinit.c index aeaee407099..52e3456cfe5 100644 --- a/reactos/ntoskrnl/kd/kdinit.c +++ b/reactos/ntoskrnl/kd/kdinit.c @@ -34,7 +34,7 @@ KdpGetWrapperDebugMode(PCHAR Currentp2, { PCHAR p2 = Currentp2; -#ifdef BOCHS +#ifdef DBG /* Check for BOCHS Debugging */ if (!_strnicmp(p2, "BOCHS", 5)) { @@ -43,9 +43,7 @@ KdpGetWrapperDebugMode(PCHAR Currentp2, KdpDebugMode.Bochs = TRUE; WrapperInitRoutine = KdpBochsInit; } -#endif -#ifdef GDB /* Check for GDB Debugging */ if (!_strnicmp(p2, "GDB", 3)) { @@ -62,9 +60,7 @@ KdpGetWrapperDebugMode(PCHAR Currentp2, PortInfo.ComPort = DEFAULT_DEBUG_PORT; PortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE; } -#endif - -#ifdef ICE + /* Check for PICE Debugging */ else if (!_strnicmp(p2, "PICE", 4)) {