Modified: trunk/reactos/ntoskrnl/include/internal/dbg.h
Modified: trunk/reactos/ntoskrnl/include/internal/kdb.h
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c
Modified: trunk/reactos/ntoskrnl/ke/i386/syscall.S
--- trunk/reactos/ntoskrnl/include/internal/dbg.h 2005-04-25 17:57:57 UTC (rev 14803)
+++ trunk/reactos/ntoskrnl/include/internal/dbg.h 2005-04-25 18:29:16 UTC (rev 14804)
@@ -7,12 +7,53 @@
#define KdPrintEx(_x_) DbgPrintEx _x_
#if defined(KDBG) || defined(DBG)
+
+VOID
+KdbSymLoadUserModuleSymbols(IN PLDR_MODULE LdrModule);
+
+VOID
+KdbSymFreeProcessSymbols(IN PEPROCESS Process);
+
+VOID
+KdbSymLoadDriverSymbols(IN PUNICODE_STRING Filename,
+ IN PMODULE_OBJECT Module);
+
+VOID
+KdbSymUnloadDriverSymbols(IN PMODULE_OBJECT ModuleObject);
+
+VOID
+KdbSymProcessBootSymbols(IN PCHAR FileName);
+
+VOID
+KdbSymInit(IN PMODULE_TEXT_SECTION NtoskrnlTextSection,
+ IN PMODULE_TEXT_SECTION LdrHalTextSection);
+
+BOOLEAN
+KdbSymPrintAddress(IN PVOID Address);
+
+VOID
+KdbDeleteProcessHook(IN PEPROCESS Process);
+
+NTSTATUS
+KdbSymGetAddressInformation(IN PROSSYM_INFO RosSymInfo,
+ IN ULONG_PTR RelativeAddress,
+ OUT PULONG LineNumber OPTIONAL,
+ OUT PCH FileName OPTIONAL,
+ OUT PCH FunctionName OPTIONAL);
+
+typedef struct _KDB_MODULE_INFO
+{
+ WCHAR Name[256];
+ ULONG_PTR Base;
+ ULONG Size;
+ PROSSYM_INFO RosSymInfo;
+} KDB_MODULE_INFO, *PKDB_MODULE_INFO;
+
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) KdbSymLoadUserModuleSymbols(LDRMOD)
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) KdbSymLoadDriverSymbols(FILENAME, MODULE)
# define KDB_UNLOADDRIVER_HOOK(MODULE) KdbSymUnloadDriverSymbols(MODULE)
# define KDB_LOADERINIT_HOOK(NTOS, HAL) KdbSymInit(NTOS, HAL)
# define KDB_SYMBOLFILE_HOOK(FILENAME) KdbSymProcessBootSymbols(FILENAME)
-# define KDB_DELETEPROCESS_HOOK(PROCESS) KdbDeleteProcessHook(PROCESS)
#else
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) do { } while (0)
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) do { } while (0)
@@ -20,21 +61,20 @@
# define KDB_LOADERINIT_HOOK(NTOS, HAL) do { } while (0)
# define KDB_SYMBOLFILE_HOOK(FILENAME) do { } while (0)
# define KDB_CREATE_THREAD_HOOK(CONTEXT) do { } while (0)
-# define KDB_DELETEPROCESS_HOOK(PROCESS) do { } while (0)
#endif
#ifdef KDBG
# define KeRosPrintAddress(ADDRESS) KdbSymPrintAddress(ADDRESS)
# define KdbInit() KdbpCliInit()
# define KdbModuleLoaded(FILENAME) KdbpCliModuleLoaded(FILENAME)
-//# define KdbBreak() KdbBreak()
+# define KDB_DELETEPROCESS_HOOK(PROCESS) KdbDeleteProcessHook(PROCESS)
#else
# define KeRosPrintAddress(ADDRESS) KiRosPrintAddress(ADDRESS)
# define KdbEnterDebuggerException(ER, PM, C, TF, F) kdHandleException
# define KdbInit() do { } while (0)
# define KdbEnter() do { } while (0)
# define KdbModuleLoaded(X) do { } while (0)
-//# define KdbBreak() do { } while (0)
+# define KDB_DELETEPROCESS_HOOK(PROCESS) do { } while (0)
#endif
#endif /* __INCLUDE_INTERNAL_DBG_H */
--- trunk/reactos/ntoskrnl/include/internal/kdb.h 2005-04-25 17:57:57 UTC (rev 14803)
+++ trunk/reactos/ntoskrnl/include/internal/kdb.h 2005-04-25 18:29:16 UTC (rev 14804)
@@ -80,16 +80,6 @@
KD_DEBUG_KDNOECHO
} KDB_OUTPUT_SETTINGS;
-/* from kdb_symbols.c */
-typedef struct _KDB_MODULE_INFO
-{
- WCHAR Name[256];
- ULONG_PTR Base;
- ULONG Size;
- PROSSYM_INFO RosSymInfo;
-} KDB_MODULE_INFO, *PKDB_MODULE_INFO;
-
-
/* FUNCTIONS *****************************************************************/
/* from i386/i386-dis.c */
@@ -171,50 +161,6 @@
KdbpSymFindModuleByIndex(IN INT Index,
OUT PKDB_MODULE_INFO pInfo);
-BOOLEAN
-KdbSymPrintAddress(IN PVOID Address);
-
-NTSTATUS
-KdbSymGetAddressInformation(IN PROSSYM_INFO RosSymInfo,
- IN ULONG_PTR RelativeAddress,
- OUT PULONG LineNumber OPTIONAL,
- OUT PCH FileName OPTIONAL,
- OUT PCH FunctionName OPTIONAL);
-
-VOID
-KdbSymLoadUserModuleSymbols(IN PLDR_MODULE LdrModule);
-
-VOID
-KdbSymFreeProcessSymbols(IN PEPROCESS Process);
-
-VOID
-KdbSymLoadDriverSymbols(IN PUNICODE_STRING Filename,
- IN PMODULE_OBJECT Module);
-
-VOID
-KdbSymUnloadDriverSymbols(IN PMODULE_OBJECT ModuleObject);
-
-VOID
-KdbSymProcessBootSymbols(IN PCHAR FileName);
-
-VOID
-KdbSymInit(IN PMODULE_TEXT_SECTION NtoskrnlTextSection,
- IN PMODULE_TEXT_SECTION LdrHalTextSection);
-
-
-BOOLEAN
-KdbSymPrintAddress(IN PVOID Address);
-
-KD_CONTINUE_TYPE
-KdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
- KPROCESSOR_MODE PreviousMode,
- PCONTEXT Context,
- PKTRAP_FRAME TrapFrame,
- BOOLEAN FirstChance);
-
-VOID
-KdbDeleteProcessHook(IN PEPROCESS Process);
-
/* from kdb.c */
extern PEPROCESS KdbCurrentProcess;
@@ -291,6 +237,12 @@
STDCALL
KdbpGetCommandLineSettings(PCHAR p1);
+KD_CONTINUE_TYPE
+KdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
+ KPROCESSOR_MODE PreviousMode,
+ PCONTEXT Context,
+ PKTRAP_FRAME TrapFrame,
+ BOOLEAN FirstChance);
/* other functions */
#define KdbpSafeReadMemory(dst, src, size) MmSafeCopyFromUser(dst, src, size)
--- trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c 2005-04-25 17:57:57 UTC (rev 14803)
+++ trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c 2005-04-25 18:29:16 UTC (rev 14804)
@@ -11,25 +11,12 @@
#include <ddk/ntddk.h>
#include <roscfg.h>
-#include <internal/ntoskrnl.h>
-#include <internal/ke.h>
-#include <internal/i386/segment.h>
-#include <internal/i386/mm.h>
-#include <internal/module.h>
-#include <internal/mm.h>
-#include <internal/ps.h>
-#include <internal/trap.h>
-#include <ntdll/ldr.h>
-#include <internal/safe.h>
-#include <internal/kd.h>
-#include <rosrtl/string.h>
+#include <ntoskrnl.h>
#include <reactos/rossym.h>
#define NDEBUG
#include <internal/debug.h>
-#include <internal/kdb.h>
-
/* GLOBALS ******************************************************************/
#define TAG_KDBS TAG('K', 'D', 'B', 'S')
--- trunk/reactos/ntoskrnl/ke/i386/syscall.S 2005-04-25 17:57:57 UTC (rev 14803)
+++ trunk/reactos/ntoskrnl/ke/i386/syscall.S 2005-04-25 18:29:16 UTC (rev 14804)
@@ -97,7 +97,7 @@
pushl %gs // + 0x48
sub $0x28, %esp // + 0x70
-#ifdef GDB
+#ifdef DBG
/* Trick gdb 6 into backtracing over the system call */
mov 0x6c(%esp), %ebx
pushl 4(%ebx) /* DebugEIP */ // + 0x74
@@ -124,7 +124,7 @@
CheckValidCall:
-#ifdef GDB
+#ifdef DBG
/*
* GDB thinks the function starts here and
* wants a standard prolog, so let's give it