2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/ex/dbgctrl.c
5 * PURPOSE: System debug control
6 * PROGRAMMERS: Alex Ionescu
9 /* INCLUDES *****************************************************************/
15 /* FUNCTIONS *****************************************************************/
18 * @name NtSystemDebugControl
21 * Perform various queries to debugger.
22 * This API is subject to test-case creation to further evaluate its
23 * abilities (if needed to at all)
25 * See: http://www.osronline.com/showthread.cfm?link=93915
26 * http://void.ru/files/Ntexapi.h
27 * http://www.codeguru.com/code/legacy/system/ntexapi.zip
28 * http://www.securityfocus.com/bid/9694
31 * Description of the parameter. Wrapped to more lines on ~70th
37 * @param InputBufferLength
43 * @param OutputBufferLength
49 * @return STATUS_SUCCESS in case of success, proper error code otherwise
56 NtSystemDebugControl(SYSDBG_COMMAND ControlCode
,
58 ULONG InputBufferLength
,
60 ULONG OutputBufferLength
,
65 case SysDbgQueryModuleInformation
:
66 case SysDbgQueryTraceInformation
:
67 case SysDbgSetTracepoint
:
68 case SysDbgSetSpecialCall
:
69 case SysDbgClearSpecialCalls
:
70 case SysDbgQuerySpecialCalls
:
71 case SysDbgQueryVersion
:
72 case SysDbgReadVirtual
:
73 case SysDbgWriteVirtual
:
74 case SysDbgReadPhysical
:
75 case SysDbgWritePhysical
:
76 case SysDbgReadControlSpace
:
77 case SysDbgWriteControlSpace
:
78 case SysDbgReadIoSpace
:
79 case SysDbgWriteIoSpace
:
82 case SysDbgReadBusData
:
83 case SysDbgWriteBusData
:
84 case SysDbgCheckLowMemory
:
85 case SysDbgGetTriageDump
:
86 return STATUS_NOT_IMPLEMENTED
;
87 case SysDbgBreakPoint
:
88 case SysDbgEnableKernelDebugger
:
89 case SysDbgDisableKernelDebugger
:
90 case SysDbgGetAutoKdEnable
:
91 case SysDbgSetAutoKdEnable
:
92 case SysDbgGetPrintBufferSize
:
93 case SysDbgSetPrintBufferSize
:
94 case SysDbgGetKdUmExceptionEnable
:
95 case SysDbgSetKdUmExceptionEnable
:
96 case SysDbgGetKdBlockEnable
:
97 case SysDbgSetKdBlockEnable
:
98 return KdSystemDebugControl(
100 InputBuffer
, InputBufferLength
,
101 OutputBuffer
, OutputBufferLength
,
102 ReturnLength
, KeGetPreviousMode());
104 return STATUS_INVALID_INFO_CLASS
;