Fix compilation problem..

svn path=/trunk/; revision=14804
This commit is contained in:
Alex Ionescu 2005-04-25 18:29:16 +00:00
parent 7519345381
commit a893ce48dd
4 changed files with 53 additions and 74 deletions

View file

@ -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 */

View file

@ -80,16 +80,6 @@ typedef enum _KDB_OUTPUT_SETTINGS
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 @@ BOOLEAN
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 @@ VOID
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)

View file

@ -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')

View file

@ -97,7 +97,7 @@ _KiSystemService:
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 @@ _KiSystemService:
CheckValidCall:
#ifdef GDB
#ifdef DBG
/*
* GDB thinks the function starts here and
* wants a standard prolog, so let's give it