Refine and export kernel debugger printing
This commit is contained in:
23
xtoskrnl/includes/dbg.hh
Normal file
23
xtoskrnl/includes/dbg.hh
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtoskrnl/includes/dbg.hh
|
||||
* DESCRIPTION: Kernel debugging support
|
||||
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef __XTOSKRNL_DBG_HH
|
||||
#define __XTOSKRNL_DBG_HH
|
||||
|
||||
#include <xtos.hh>
|
||||
|
||||
|
||||
/* Redefine DebugPrint macro for the kernel to enable early debugging */
|
||||
#undef DebugPrint
|
||||
#ifdef DBG
|
||||
#define DebugPrint(Format, ...) if(KD::DebugIo::KdPrint) KD::DebugIo::KdPrint(Format, __VA_ARGS__);
|
||||
#else
|
||||
#define DebugPrint(Format, ...) ((VOID)NULL)
|
||||
#endif
|
||||
|
||||
#endif /* __XTOSKRNL_DBG_HH */
|
@@ -2,7 +2,7 @@
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtoskrnl/includes/kd/dbgio.hh
|
||||
* DESCRIPTION:
|
||||
* DESCRIPTION: Kernel Debugger I/O support
|
||||
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
|
||||
*/
|
||||
|
||||
@@ -17,6 +17,9 @@ namespace KD
|
||||
{
|
||||
class DebugIo
|
||||
{
|
||||
public:
|
||||
STATIC PKD_PRINT_ROUTINE KdPrint;
|
||||
|
||||
private:
|
||||
STATIC KD_DEBUG_MODE DebugMode;
|
||||
STATIC PKD_INIT_ROUTINE IoProvidersInitRoutines[KDBG_PROVIDERS_COUNT];
|
||||
@@ -25,7 +28,10 @@ namespace KD
|
||||
STATIC ULONG SerialPortList[COMPORT_COUNT];
|
||||
|
||||
public:
|
||||
STATIC XTCDECL VOID DbgPrint(PCWSTR Format, ...);
|
||||
STATIC XTCDECL VOID DbgPrint(PCWSTR Format,
|
||||
...);
|
||||
STATIC XTCDECL VOID DbgPrintEx(PCWSTR Format,
|
||||
VA_LIST Arguments);
|
||||
STATIC XTAPI XTSTATUS InitializeDebugIoProviders(VOID);
|
||||
STATIC XTAPI VOID SetPrintRoutine(PKD_PRINT_ROUTINE DebugPrintRoutine);
|
||||
|
||||
|
@@ -27,6 +27,7 @@ extern "C" {
|
||||
|
||||
|
||||
#include <ar.hh>
|
||||
#include <dbg.hh>
|
||||
#include <ex.hh>
|
||||
#include <hl.hh>
|
||||
#include <kd.hh>
|
||||
|
Reference in New Issue
Block a user