Small Debugging Services re-arrangement. /dbgk created for User-Mode debugging and...
authorAlex Ionescu <aionescu@gmail.com>
Sat, 23 Apr 2005 06:41:25 +0000 (06:41 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sat, 23 Apr 2005 06:41:25 +0000 (06:41 +0000)
svn path=/trunk/; revision=14760

29 files changed:
reactos/ntoskrnl/Makefile
reactos/ntoskrnl/Makefile.i386
reactos/ntoskrnl/ex/init.c
reactos/ntoskrnl/include/internal/dbg.h
reactos/ntoskrnl/include/internal/debug.h
reactos/ntoskrnl/include/ntoskrnl.h
reactos/ntoskrnl/io/iomgr.c
reactos/ntoskrnl/kd/kdebug.c
reactos/ntoskrnl/kd/mda.c
reactos/ntoskrnl/kdbg/dbgctrl.c [moved from reactos/ntoskrnl/dbg/dbgctrl.c with 100% similarity]
reactos/ntoskrnl/kdbg/errinfo.c [moved from reactos/ntoskrnl/dbg/errinfo.c with 100% similarity]
reactos/ntoskrnl/kdbg/i386/dis-asm.h [moved from reactos/ntoskrnl/dbg/i386/dis-asm.h with 100% similarity]
reactos/ntoskrnl/kdbg/i386/i386-dis.c [moved from reactos/ntoskrnl/dbg/i386/i386-dis.c with 100% similarity]
reactos/ntoskrnl/kdbg/i386/kdb_help.S [moved from reactos/ntoskrnl/dbg/i386/kdb_help.S with 100% similarity]
reactos/ntoskrnl/kdbg/i386/longjmp.S [moved from reactos/ntoskrnl/dbg/i386/longjmp.S with 100% similarity]
reactos/ntoskrnl/kdbg/i386/setjmp.S [moved from reactos/ntoskrnl/dbg/i386/setjmp.S with 100% similarity]
reactos/ntoskrnl/kdbg/kdb.c [moved from reactos/ntoskrnl/dbg/kdb.c with 99% similarity]
reactos/ntoskrnl/kdbg/kdb.h [moved from reactos/ntoskrnl/dbg/kdb.h with 100% similarity]
reactos/ntoskrnl/kdbg/kdb_cli.c [moved from reactos/ntoskrnl/dbg/kdb_cli.c with 99% similarity]
reactos/ntoskrnl/kdbg/kdb_expr.c [moved from reactos/ntoskrnl/dbg/kdb_expr.c with 96% similarity]
reactos/ntoskrnl/kdbg/kdb_keyboard.c [moved from reactos/ntoskrnl/dbg/kdb_keyboard.c with 100% similarity]
reactos/ntoskrnl/kdbg/kdb_serial.c [moved from reactos/ntoskrnl/dbg/kdb_serial.c with 100% similarity]
reactos/ntoskrnl/kdbg/kdb_string.c [moved from reactos/ntoskrnl/dbg/kdb_string.c with 100% similarity]
reactos/ntoskrnl/kdbg/kdb_symbols.c [moved from reactos/ntoskrnl/dbg/kdb_symbols.c with 99% similarity]
reactos/ntoskrnl/kdbg/print.c [moved from reactos/ntoskrnl/dbg/print.c with 100% similarity]
reactos/ntoskrnl/kdbg/rdebug.c [moved from reactos/ntoskrnl/dbg/rdebug.c with 100% similarity]
reactos/ntoskrnl/kdbg/user.c [moved from reactos/ntoskrnl/dbg/user.c with 100% similarity]
reactos/ntoskrnl/ke/i386/irq.c
reactos/ntoskrnl/lpc/send.c

index 1cfda91..384cd00 100644 (file)
@@ -24,18 +24,6 @@ endif
 LINKER_SCRIPT := ntoskrnl.lnk
 STRIP_FLAGS := -Wl,-s
 
-ifeq ($(KDBG), 1)
-OBJECTS_KDBG := dbg/kdb.o dbg/kdb_cli.o dbg/kdb_expr.o dbg/kdb_keyboard.o \
-                dbg/kdb_serial.o dbg/kdb_string.o dbg/rdebug.o dbg/i386/kdb_help.o \
-                dbg/i386/i386-dis.o dbg/i386/longjmp.o dbg/i386/setjmp.o
-preall: all
-else
-OBJECTS_KDBG :=
-endif
-ifeq ($(DBG_OR_KDBG), 1)
-OBJECTS_KDBG := $(OBJECTS_KDBG) dbg/kdb_symbols.o
-endif
-
 TARGET_ASFLAGS = -I./include
 TARGET_CFLAGS = -I./include $(CFLAGS_KDBG) -Wall -Werror $(CFLAGS_OPT)
 
@@ -74,6 +62,7 @@ OBJECTS_RTL = \
        rtl/atom.o \
        rtl/capture.o \
        rtl/ctype.o \
+       rtl/debug.o \
        rtl/handle.o \
        rtl/message.o \
        rtl/misc.o \
@@ -240,6 +229,7 @@ OBJECTS_PS = \
 # Executive Subsystem (Ex)
 OBJECTS_EX = \
        ex/callback.o \
+       ex/dbgctrl.o \
        ex/error.o \
        ex/event.o \
        ex/evtpair.o \
@@ -301,14 +291,6 @@ OBJECTS_CM = \
        cm/registry.o  \
        cm/regobj.o \
 
-# Debugger Support (Dbg)
-OBJECTS_DBG = \
-       dbg/dbgctrl.o \
-       dbg/errinfo.o \
-       dbg/print.o \
-       dbg/user.o \
-       $(OBJECTS_KDBG)
-
 # Loader
 OBJECTS_LDR = \
        ldr/init.o \
@@ -352,6 +334,29 @@ OBJECTS_KD = \
        kd/kdebug.o \
        kd/mda.o \
        kd/service.o
+       
+# User-Mode Debugging (Dbgk)
+OBJECTS_DBGK = \
+       dbgk/dbgkutil.o \
+       dbgk/debug.o
+
+ifeq ($(KDBG), 1)
+OBJECTS_KDBG := \
+       kdbg/kdb.o \
+       kdbg/kdb_cli.o \
+       kdbg/kdb_expr.o \
+       kdbg/kdb_keyboard.o \
+       kdbg/kdb_serial.o \
+       kdbg/kdb_string.o
+preall: all
+else
+OBJECTS_KDBG :=
+endif
+ifeq ($(DBG_OR_KDBG), 1)
+OBJECTS_KDBG := \
+       $(OBJECTS_KDBG) \
+       kdbg/kdb_symbols.o
+endif
 
 # Boot video (Inbv)
 OBJECTS_INBV = \
@@ -360,7 +365,7 @@ OBJECTS_INBV = \
 DEP_OBJECTS := $(OBJECTS_MM) $(OBJECTS_ARCH) \
        $(OBJECTS_IO) $(OBJECTS_KE) $(OBJECTS_OB) \
        $(OBJECTS_PS) $(OBJECTS_EX) $(OBJECTS_CC) $(OBJECTS_FS) $(OBJECTS_SE) \
-       $(OBJECTS_DBG) $(OBJECTS_CM) $(OBJECTS_LDR) $(OBJECTS_LPC) \
+       $(OBJECTS_KDBG) $(OBJECTS_DBGK) $(OBJECTS_CM) $(OBJECTS_LDR) $(OBJECTS_LPC) \
        $(OBJECTS_PO) $(OBJECTS_KD) $(OBJECTS_RTL) $(OBJECTS_INBV)
 
 TAG_OBJECTS := $(join $(dir $(DEP_OBJECTS)),$(patsubst %.o, .%.TAG, $(notdir $(DEP_OBJECTS))))
@@ -383,12 +388,12 @@ OBJECTS := \
        $(OBJECTS_KE) \
        $(OBJECTS_CC) \
        $(OBJECTS_CM) \
-       $(OBJECTS_DBG) \
        $(OBJECTS_EX) \
        $(OBJECTS_LPC) \
        $(OBJECTS_FS) \
        $(OBJECTS_IO) \
        $(OBJECTS_KD) \
+       $(OBJECTS_DBGK) \
        $(OBJECTS_LDR) \
        $(OBJECTS_MM) \
        $(OBJECTS_OB) \
@@ -396,6 +401,7 @@ OBJECTS := \
        $(OBJECTS_PS) \
        $(OBJECTS_RTL) \
        $(OBJECTS_SE) \
+       $(OBJECTS_KDBG) \
        $(OBJECTS_INBV) \
        $(OBJECTS_RESOURCE)
 
index c38d337..5c1fcae 100644 (file)
@@ -52,10 +52,21 @@ OBJECTS_RTL_I386 := \
        rtl/i386/exception.o \
        rtl/i386/seh.o
 
+ifeq ($(KDBG), 1)
+OBJECTS_KDBG_I386 := \
+       kdbg/i386/kdb_help.o \
+       kdbg/i386/i386-dis.o \
+       kdbg/i386/longjmp.o \
+       kdbg/i386/setjmp.o
+preall: all
+else
+OBJECTS_KDBG_I386 :=
+endif
+
 OBJECTS_PS_I386 := \
        ps/i386/continue.o
 
 RTL_EXCLUDE_FILTER := 
 
 OBJECTS_ARCH = $(OBJECTS_BOOT) $(OBJECTS_EX_I386) $(OBJECTS_KE_I386) $(OBJECTS_MM_I386) \
-  $(OBJECTS_RTL_I386) $(OBJECTS_PS_I386)
+  $(OBJECTS_RTL_I386) $(OBJECTS_KDBG_I386) $(OBJECTS_PS_I386)
index 66e8938..d80e56f 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <ntoskrnl.h>
 #include <ntos/bootvid.h>
-#include "../dbg/kdb.h"
+#include <internal/kdb.h>
 #define NDEBUG
 #include <internal/debug.h>
 
index 7f06b68..8e85681 100644 (file)
@@ -10,11 +10,5 @@ NTSTATUS STDCALL
 LpcSendDebugMessagePort(PEPORT Port,
                        PLPC_DBG_MESSAGE Message,
                        PLPC_DBG_MESSAGE Reply);
-VOID
-DbgkCreateThread(PVOID StartAddress);
-ULONG
-DbgkForwardException(EXCEPTION_RECORD Er, ULONG FirstChance);
-BOOLEAN
-DbgShouldPrint(PCH Filename);
 
 #endif /* __INCLUDE_INTERNAL_DBG_H */
index 3132413..5d2c184 100644 (file)
 
 #define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0)
 
-#if defined(KDBG) && defined(NDEBUG) && defined(__NTOSKRNL__)
-
-#define DPRINT(args...) do { \
-  if (DbgShouldPrint(__FILE__)) { \
-    DbgPrint("(%s:%d) ",__FILE__,__LINE__); \
-    DbgPrint(args); \
-  } \
-} while(0)
-
-#define CHECKPOINT
-
-#else /* KDBG && NDEBUG && __NTOSKRNL__ */
-
 #ifndef NDEBUG
 #ifdef __GNUC__ /* using GNU C/C99 macro ellipsis */
 #define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
 #define CHECKPOINT
 #endif /* NDEBUG */
 
-#endif /* KDBG && NDEBUG */
 
 /*
  * FUNCTION: Assert a maximum value for the current irql
index 76088c0..b9462f5 100755 (executable)
@@ -54,6 +54,7 @@
 #include <internal/port.h>
 #include <internal/nls.h>
 #include <internal/dbg.h>
+#include <internal/dbgk.h>
 #include <internal/trap.h>
 #include <internal/safe.h>
 #include <internal/test.h>
index 8614e60..02233f9 100644 (file)
@@ -11,7 +11,7 @@
 /* INCLUDES ****************************************************************/
 
 #include <ntoskrnl.h>
-#include "../dbg/kdb.h"
+#include <internal/kdb.h>
 #define NDEBUG
 #include <internal/debug.h>
 
@@ -642,7 +642,6 @@ IoInit3(VOID)
     Status = IoCreateSystemRootLink((PCHAR)KeLoaderBlock.CommandLine);
     if (!NT_SUCCESS(Status)) {
         DbgPrint("IoCreateSystemRootLink FAILED: (0x%x) - ", Status);
-        DbgPrintErrorMessage (Status);
         KEBUGCHECK(INACCESSIBLE_BOOT_DEVICE);
     }
 
index 06c3856..374c0a2 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <ntoskrnl.h>
-#include "../dbg/kdb.h"
+#include <internal/kdb.h>
 #include <internal/debug.h>
 
 /* serial debug connection */
@@ -78,11 +78,6 @@ KdInitSystem(ULONG BootPhase,
 
   if (BootPhase > 0)
     {
-#ifdef KDBG
-      /* Initialize runtime debugging if available */
-      DbgRDebugInit();
-#endif
-
 #ifdef KDBG
       /* Initialize the local kernel debugger. */
       KdDebuggerEnabled = TRUE;
index cd6887a..c03ea0e 100644 (file)
@@ -11,7 +11,7 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntoskrnl.h>
-#include "../dbg/kdb.h"
+#include <internal/kdb.h>
 
 /* VARIABLES ***************************************************************/
 
similarity index 99%
rename from reactos/ntoskrnl/dbg/kdb.c
rename to reactos/ntoskrnl/kdbg/kdb.c
index f6a0863..0a8f205 100644 (file)
@@ -11,7 +11,7 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntoskrnl.h>
-#include "kdb.h"
+#include <internal/kdb.h>
 #define NDEBUG
 #include <internal/debug.h>
 
similarity index 99%
rename from reactos/ntoskrnl/dbg/kdb_cli.c
rename to reactos/ntoskrnl/kdbg/kdb_cli.c
index f3b6020..4df5a35 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <ntoskrnl.h>
 #include <ctype.h>
-#include "kdb.h"
+#include <internal/kdb.h>
 
 #define NDEBUG
 #include <internal/debug.h>
similarity index 96%
rename from reactos/ntoskrnl/dbg/kdb_expr.c
rename to reactos/ntoskrnl/kdbg/kdb_expr.c
index fb36fed..e1765c7 100644 (file)
@@ -35,7 +35,7 @@
 /* INCLUDES ******************************************************************/\r
 \r
 #include <ntoskrnl.h>\r
-#include "kdb.h"\r
+#include <internal/kdb.h>\r
 #define NDEBUG\r
 #include <internal/debug.h>\r
 \r
similarity index 99%
rename from reactos/ntoskrnl/dbg/kdb_symbols.c
rename to reactos/ntoskrnl/kdbg/kdb_symbols.c
index c95259e..d1ae975 100644 (file)
@@ -28,7 +28,7 @@
 #define NDEBUG
 #include <internal/debug.h>
 
-#include "kdb.h"
+#include <internal/kdb.h>
 
 /* GLOBALS ******************************************************************/
 
index 22d269b..22fcf10 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <ntoskrnl.h>
 #if defined(KDBG) || defined(DBG)
-#include <../dbg/kdb.h>
+#include <internal/kdb.h>
 #endif /* KDBG */
 
 #include <../hal/halx86/include/halirq.h>
index 1f790c8..1179f12 100644 (file)
@@ -11,6 +11,7 @@
 /* INCLUDES *****************************************************************/
 
 #include <ntoskrnl.h>
+
 #define NDEBUG
 #include <internal/debug.h>