mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Fix compilation problem..
svn path=/trunk/; revision=14804
This commit is contained in:
parent
7519345381
commit
a893ce48dd
4 changed files with 53 additions and 74 deletions
|
@ -7,12 +7,53 @@
|
||||||
#define KdPrintEx(_x_) DbgPrintEx _x_
|
#define KdPrintEx(_x_) DbgPrintEx _x_
|
||||||
|
|
||||||
#if defined(KDBG) || defined(DBG)
|
#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_LOADUSERMODULE_HOOK(LDRMOD) KdbSymLoadUserModuleSymbols(LDRMOD)
|
||||||
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) KdbSymLoadDriverSymbols(FILENAME, MODULE)
|
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) KdbSymLoadDriverSymbols(FILENAME, MODULE)
|
||||||
# define KDB_UNLOADDRIVER_HOOK(MODULE) KdbSymUnloadDriverSymbols(MODULE)
|
# define KDB_UNLOADDRIVER_HOOK(MODULE) KdbSymUnloadDriverSymbols(MODULE)
|
||||||
# define KDB_LOADERINIT_HOOK(NTOS, HAL) KdbSymInit(NTOS, HAL)
|
# define KDB_LOADERINIT_HOOK(NTOS, HAL) KdbSymInit(NTOS, HAL)
|
||||||
# define KDB_SYMBOLFILE_HOOK(FILENAME) KdbSymProcessBootSymbols(FILENAME)
|
# define KDB_SYMBOLFILE_HOOK(FILENAME) KdbSymProcessBootSymbols(FILENAME)
|
||||||
# define KDB_DELETEPROCESS_HOOK(PROCESS) KdbDeleteProcessHook(PROCESS)
|
|
||||||
#else
|
#else
|
||||||
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) do { } while (0)
|
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) do { } while (0)
|
||||||
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) 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_LOADERINIT_HOOK(NTOS, HAL) do { } while (0)
|
||||||
# define KDB_SYMBOLFILE_HOOK(FILENAME) do { } while (0)
|
# define KDB_SYMBOLFILE_HOOK(FILENAME) do { } while (0)
|
||||||
# define KDB_CREATE_THREAD_HOOK(CONTEXT) do { } while (0)
|
# define KDB_CREATE_THREAD_HOOK(CONTEXT) do { } while (0)
|
||||||
# define KDB_DELETEPROCESS_HOOK(PROCESS) do { } while (0)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KDBG
|
#ifdef KDBG
|
||||||
# define KeRosPrintAddress(ADDRESS) KdbSymPrintAddress(ADDRESS)
|
# define KeRosPrintAddress(ADDRESS) KdbSymPrintAddress(ADDRESS)
|
||||||
# define KdbInit() KdbpCliInit()
|
# define KdbInit() KdbpCliInit()
|
||||||
# define KdbModuleLoaded(FILENAME) KdbpCliModuleLoaded(FILENAME)
|
# define KdbModuleLoaded(FILENAME) KdbpCliModuleLoaded(FILENAME)
|
||||||
//# define KdbBreak() KdbBreak()
|
# define KDB_DELETEPROCESS_HOOK(PROCESS) KdbDeleteProcessHook(PROCESS)
|
||||||
#else
|
#else
|
||||||
# define KeRosPrintAddress(ADDRESS) KiRosPrintAddress(ADDRESS)
|
# define KeRosPrintAddress(ADDRESS) KiRosPrintAddress(ADDRESS)
|
||||||
# define KdbEnterDebuggerException(ER, PM, C, TF, F) kdHandleException
|
# define KdbEnterDebuggerException(ER, PM, C, TF, F) kdHandleException
|
||||||
# define KdbInit() do { } while (0)
|
# define KdbInit() do { } while (0)
|
||||||
# define KdbEnter() do { } while (0)
|
# define KdbEnter() do { } while (0)
|
||||||
# define KdbModuleLoaded(X) do { } while (0)
|
# define KdbModuleLoaded(X) do { } while (0)
|
||||||
//# define KdbBreak() do { } while (0)
|
# define KDB_DELETEPROCESS_HOOK(PROCESS) do { } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __INCLUDE_INTERNAL_DBG_H */
|
#endif /* __INCLUDE_INTERNAL_DBG_H */
|
||||||
|
|
|
@ -80,16 +80,6 @@ typedef enum _KDB_OUTPUT_SETTINGS
|
||||||
KD_DEBUG_KDNOECHO
|
KD_DEBUG_KDNOECHO
|
||||||
} KDB_OUTPUT_SETTINGS;
|
} 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 *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
/* from i386/i386-dis.c */
|
/* from i386/i386-dis.c */
|
||||||
|
@ -171,50 +161,6 @@ BOOLEAN
|
||||||
KdbpSymFindModuleByIndex(IN INT Index,
|
KdbpSymFindModuleByIndex(IN INT Index,
|
||||||
OUT PKDB_MODULE_INFO pInfo);
|
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 */
|
/* from kdb.c */
|
||||||
|
|
||||||
extern PEPROCESS KdbCurrentProcess;
|
extern PEPROCESS KdbCurrentProcess;
|
||||||
|
@ -291,6 +237,12 @@ VOID
|
||||||
STDCALL
|
STDCALL
|
||||||
KdbpGetCommandLineSettings(PCHAR p1);
|
KdbpGetCommandLineSettings(PCHAR p1);
|
||||||
|
|
||||||
|
KD_CONTINUE_TYPE
|
||||||
|
KdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
|
||||||
|
KPROCESSOR_MODE PreviousMode,
|
||||||
|
PCONTEXT Context,
|
||||||
|
PKTRAP_FRAME TrapFrame,
|
||||||
|
BOOLEAN FirstChance);
|
||||||
/* other functions */
|
/* other functions */
|
||||||
|
|
||||||
#define KdbpSafeReadMemory(dst, src, size) MmSafeCopyFromUser(dst, src, size)
|
#define KdbpSafeReadMemory(dst, src, size) MmSafeCopyFromUser(dst, src, size)
|
||||||
|
|
|
@ -11,25 +11,12 @@
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <roscfg.h>
|
#include <roscfg.h>
|
||||||
#include <internal/ntoskrnl.h>
|
#include <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 <reactos/rossym.h>
|
#include <reactos/rossym.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <internal/debug.h>
|
||||||
|
|
||||||
#include <internal/kdb.h>
|
|
||||||
|
|
||||||
/* GLOBALS ******************************************************************/
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
#define TAG_KDBS TAG('K', 'D', 'B', 'S')
|
#define TAG_KDBS TAG('K', 'D', 'B', 'S')
|
||||||
|
|
|
@ -97,7 +97,7 @@ _KiSystemService:
|
||||||
pushl %gs // + 0x48
|
pushl %gs // + 0x48
|
||||||
sub $0x28, %esp // + 0x70
|
sub $0x28, %esp // + 0x70
|
||||||
|
|
||||||
#ifdef GDB
|
#ifdef DBG
|
||||||
/* Trick gdb 6 into backtracing over the system call */
|
/* Trick gdb 6 into backtracing over the system call */
|
||||||
mov 0x6c(%esp), %ebx
|
mov 0x6c(%esp), %ebx
|
||||||
pushl 4(%ebx) /* DebugEIP */ // + 0x74
|
pushl 4(%ebx) /* DebugEIP */ // + 0x74
|
||||||
|
@ -124,7 +124,7 @@ _KiSystemService:
|
||||||
|
|
||||||
CheckValidCall:
|
CheckValidCall:
|
||||||
|
|
||||||
#ifdef GDB
|
#ifdef DBG
|
||||||
/*
|
/*
|
||||||
* GDB thinks the function starts here and
|
* GDB thinks the function starts here and
|
||||||
* wants a standard prolog, so let's give it
|
* wants a standard prolog, so let's give it
|
||||||
|
|
Loading…
Reference in a new issue