Add function to query kernel debugger active state
This commit is contained in:
@@ -13,5 +13,6 @@
|
|||||||
|
|
||||||
#include <kd/dbg.hh>
|
#include <kd/dbg.hh>
|
||||||
#include <kd/dbgio.hh>
|
#include <kd/dbgio.hh>
|
||||||
|
#include <kd/debug.hh>
|
||||||
|
|
||||||
#endif /* __XTOSKRNL_KD_HH */
|
#endif /* __XTOSKRNL_KD_HH */
|
||||||
|
|||||||
31
xtoskrnl/includes/kd/debug.hh
Normal file
31
xtoskrnl/includes/kd/debug.hh
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* PROJECT: ExectOS
|
||||||
|
* COPYRIGHT: See COPYING.md in the top level directory
|
||||||
|
* FILE: xtoskrnl/includes/kd/debug.hh
|
||||||
|
* DESCRIPTION: Kernel Debugger
|
||||||
|
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __XTOSKRNL_KD_DEBUG_HH
|
||||||
|
#define __XTOSKRNL_KD_DEBUG_HH
|
||||||
|
|
||||||
|
#include <xtos.hh>
|
||||||
|
|
||||||
|
|
||||||
|
/* Kernel Debugger */
|
||||||
|
namespace KD
|
||||||
|
{
|
||||||
|
class Debugger
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
STATIC PKD_PRINT_ROUTINE KdPrint;
|
||||||
|
|
||||||
|
private:
|
||||||
|
STATIC BOOLEAN Active;
|
||||||
|
|
||||||
|
public:
|
||||||
|
STATIC XTAPI BOOLEAN DebuggerActive(VOID);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __XTOSKRNL_KD_DEBUG_HH */
|
||||||
24
xtoskrnl/kd/debug.cc
Normal file
24
xtoskrnl/kd/debug.cc
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/**
|
||||||
|
* PROJECT: ExectOS
|
||||||
|
* COPYRIGHT: See COPYING.md in the top level directory
|
||||||
|
* FILE: xtoskrnl/kd/debug.cc
|
||||||
|
* DESCRIPTION: Kernel Debugger
|
||||||
|
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <xtos.hh>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines whether the interactive kernel debugger is currently active and controlling the execution flow.
|
||||||
|
*
|
||||||
|
* @return This routine returns TRUE if the kernel debugger is active, or FALSE otherwise.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTAPI
|
||||||
|
BOOLEAN
|
||||||
|
KD::Debugger::DebuggerActive(VOID)
|
||||||
|
{
|
||||||
|
return Active;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user