mirror of
https://github.com/reactos/reactos.git
synced 2024-08-21 02:43:48 +00:00
Small Debugging Services re-arrangement. /dbgk created for User-Mode debugging and Native Debug Objects (implemented an experimental NtCreateDebugObject. Untested and doesn't work since the DbgkObjectType isn't created yet. Added dbgk.h with the basic structures for now. Removed /dbg and split up code in ex/debug.c for executive and rtl/debug.c for RunTime Library Debug calls. Kdbg now dedicated in /kdbg.
svn path=/trunk/; revision=14760
This commit is contained in:
parent
45ae6da0c6
commit
665e646216
|
@ -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 \
|
||||
|
@ -353,6 +335,29 @@ OBJECTS_KD = \
|
|||
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 = \
|
||||
inbv/inbv.o
|
||||
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -93,19 +93,6 @@
|
|||
|
||||
#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)
|
||||
|
@ -122,7 +109,6 @@
|
|||
#define CHECKPOINT
|
||||
#endif /* NDEBUG */
|
||||
|
||||
#endif /* KDBG && NDEBUG */
|
||||
|
||||
/*
|
||||
* FUNCTION: Assert a maximum value for the current irql
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ntoskrnl.h>
|
||||
#include "../dbg/kdb.h"
|
||||
#include <internal/kdb.h>
|
||||
|
||||
/* VARIABLES ***************************************************************/
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ntoskrnl.h>
|
||||
#include "kdb.h"
|
||||
#include <internal/kdb.h>
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <ntoskrnl.h>
|
||||
#include <ctype.h>
|
||||
#include "kdb.h"
|
||||
#include <internal/kdb.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
|
@ -35,7 +35,7 @@
|
|||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ntoskrnl.h>
|
||||
#include "kdb.h"
|
||||
#include <internal/kdb.h>
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#include "kdb.h"
|
||||
#include <internal/kdb.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
|
@ -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>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ntoskrnl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue