mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Remove dbg.h and move it to kd.h, it was getting confusing to have so many debug files. Also fixes hal to compile
svn path=/trunk/; revision=14806
This commit is contained in:
parent
a3bf890534
commit
d06c1ef5e9
3 changed files with 76 additions and 3 deletions
|
@ -19,8 +19,6 @@
|
|||
#define __INTERNAL_DEBUG
|
||||
|
||||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
/* TODO: Verify which version the MS compiler learned the __FUNCTION__ macro */
|
||||
|
|
|
@ -11,12 +11,88 @@
|
|||
#include <ntdll/ldr.h>
|
||||
|
||||
struct _KD_DISPATCH_TABLE;
|
||||
#define KdPrintEx(_x_) DbgPrintEx _x_
|
||||
|
||||
#ifdef DBG
|
||||
#include "kdgdb.h"
|
||||
#include "kdbochs.h"
|
||||
#endif
|
||||
|
||||
/* SYMBOL ROUTINES **********************************************************/
|
||||
|
||||
#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;
|
||||
|
||||
/* MACROS FOR NON-KDBG BUILDS ************************************************/
|
||||
|
||||
# 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)
|
||||
#else
|
||||
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) do { } while (0)
|
||||
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) do { } while (0)
|
||||
# define KDB_UNLOADDRIVER_HOOK(MODULE) do { } while (0)
|
||||
# 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)
|
||||
#endif
|
||||
|
||||
#ifdef KDBG
|
||||
# define KeRosPrintAddress(ADDRESS) KdbSymPrintAddress(ADDRESS)
|
||||
# define KdbInit() KdbpCliInit()
|
||||
# define KdbModuleLoaded(FILENAME) KdbpCliModuleLoaded(FILENAME)
|
||||
# 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 KDB_DELETEPROCESS_HOOK(PROCESS) do { } while (0)
|
||||
#endif
|
||||
|
||||
/* KD ROUTINES ***************************************************************/
|
||||
|
||||
typedef enum _KD_CONTINUE_TYPE
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include <internal/ifs.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/nls.h>
|
||||
#include <internal/dbg.h>
|
||||
#ifdef KDBG
|
||||
#include <internal/kdb.h>
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue