2005-04-25 14:44:48 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* FILE: ntoskrnl/kd/kdio.c
|
|
|
|
* PURPOSE: NT Kernel Debugger Input/Output Functions
|
|
|
|
*
|
|
|
|
* PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
|
|
|
#include <ntoskrnl.h>
|
|
|
|
#include <internal/debug.h>
|
|
|
|
|
|
|
|
/* GLOBALS *******************************************************************/
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
#define BufferSize 32*1024
|
2005-04-25 14:44:48 +00:00
|
|
|
|
|
|
|
HANDLE KdbLogFileHandle;
|
|
|
|
BOOLEAN KdpLogInitialized;
|
|
|
|
CHAR DebugBuffer[BufferSize];
|
|
|
|
ULONG CurrentPosition;
|
|
|
|
WORK_QUEUE_ITEM KdpDebugLogQueue;
|
|
|
|
BOOLEAN ItemQueued;
|
2005-04-26 19:06:19 +00:00
|
|
|
KD_PORT_INFORMATION SerialPortInfo = {DEFAULT_DEBUG_PORT, DEFAULT_DEBUG_BAUD_RATE, 0};
|
2005-04-25 14:44:48 +00:00
|
|
|
|
|
|
|
/* Current Port in use. FIXME: Do we support more then one? */
|
|
|
|
ULONG KdpPort;
|
|
|
|
|
|
|
|
/* DEBUG LOG FUNCTIONS *******************************************************/
|
|
|
|
|
|
|
|
VOID
|
|
|
|
STDCALL
|
|
|
|
KdpPrintToLogInternal(PVOID Context)
|
|
|
|
{
|
|
|
|
IO_STATUS_BLOCK Iosb;
|
|
|
|
|
|
|
|
/* Write to the Debug Log */
|
|
|
|
NtWriteFile(KdbLogFileHandle,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
&Iosb,
|
|
|
|
DebugBuffer,
|
|
|
|
CurrentPosition,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Clear the Current Position */
|
|
|
|
CurrentPosition = 0;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* A new item can be queued now */
|
|
|
|
ItemQueued = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
STDCALL
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
KdpPrintToLog(PCH String,
|
|
|
|
ULONG StringLength)
|
2005-04-25 14:44:48 +00:00
|
|
|
{
|
|
|
|
/* Don't overflow */
|
|
|
|
if ((CurrentPosition + StringLength) > BufferSize) return;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Add the string to the buffer */
|
2006-10-22 09:06:58 +00:00
|
|
|
RtlCopyMemory(&DebugBuffer[CurrentPosition], String, StringLength);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Update the Current Position */
|
|
|
|
CurrentPosition += StringLength;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Make sure we are initialized and can queue */
|
|
|
|
if (!KdpLogInitialized || (ItemQueued)) return;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2007-10-19 23:21:45 +00:00
|
|
|
/*
|
|
|
|
* Queue the work item
|
2005-07-26 15:15:18 +00:00
|
|
|
* Note that we don't want to queue if we are > DISPATCH_LEVEL...
|
|
|
|
* The message is in the buffer and will simply be taken care of at
|
|
|
|
* the next time we are at <= DISPATCH, so it won't be lost.
|
|
|
|
*/
|
|
|
|
if (KeGetCurrentIrql() <= DISPATCH_LEVEL)
|
|
|
|
{
|
|
|
|
ExQueueWorkItem(&KdpDebugLogQueue, HyperCriticalWorkQueue);
|
|
|
|
ItemQueued = TRUE;
|
|
|
|
}
|
2005-04-25 14:44:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
STDCALL
|
|
|
|
KdpInitDebugLog(PKD_DISPATCH_TABLE DispatchTable,
|
|
|
|
ULONG BootPhase)
|
|
|
|
{
|
|
|
|
NTSTATUS Status;
|
|
|
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
|
|
|
UNICODE_STRING FileName;
|
2005-05-09 01:38:29 +00:00
|
|
|
IO_STATUS_BLOCK Iosb;
|
|
|
|
|
2005-07-30 16:25:35 +00:00
|
|
|
if (!KdpDebugMode.File) return;
|
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
if (BootPhase == 0)
|
|
|
|
{
|
2007-07-08 20:13:20 +00:00
|
|
|
*KdComPortInUse = NULL;
|
2006-06-22 21:26:31 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Write out the functions that we support for now */
|
|
|
|
DispatchTable->KdpInitRoutine = KdpInitDebugLog;
|
|
|
|
DispatchTable->KdpPrintRoutine = KdpPrintToLog;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Register as a Provider */
|
|
|
|
InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);
|
2006-06-11 08:25:10 +00:00
|
|
|
|
|
|
|
/* Display separator + ReactOS version at start of the debug log */
|
|
|
|
DPRINT1("---------------------------------------------------------------\n");
|
|
|
|
DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n");
|
2005-04-25 14:44:48 +00:00
|
|
|
}
|
|
|
|
else if (BootPhase == 2)
|
|
|
|
{
|
|
|
|
HalDisplayString("\n File log debugging enabled\n\n");
|
|
|
|
}
|
|
|
|
else if (BootPhase == 3)
|
|
|
|
{
|
|
|
|
/* Setup the Log Name */
|
|
|
|
RtlInitUnicodeString(&FileName, L"\\SystemRoot\\debug.log");
|
|
|
|
InitializeObjectAttributes(&ObjectAttributes,
|
|
|
|
&FileName,
|
|
|
|
0,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Create the Log File */
|
|
|
|
Status = NtCreateFile(&KdbLogFileHandle,
|
|
|
|
FILE_ALL_ACCESS,
|
|
|
|
&ObjectAttributes,
|
|
|
|
&Iosb,
|
|
|
|
NULL,
|
|
|
|
FILE_ATTRIBUTE_NORMAL,
|
|
|
|
FILE_SHARE_READ,
|
|
|
|
FILE_SUPERSEDE,
|
|
|
|
FILE_WRITE_THROUGH | FILE_SYNCHRONOUS_IO_NONALERT,
|
|
|
|
NULL,
|
|
|
|
0);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Allow it to be used */
|
|
|
|
ExInitializeWorkItem(&KdpDebugLogQueue, &KdpPrintToLogInternal, NULL);
|
|
|
|
KdpLogInitialized = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* SERIAL FUNCTIONS **********************************************************/
|
|
|
|
|
|
|
|
VOID
|
|
|
|
STDCALL
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
KdpSerialDebugPrint(LPSTR Message,
|
|
|
|
ULONG Length)
|
2005-04-25 14:44:48 +00:00
|
|
|
{
|
|
|
|
PCHAR pch = (PCHAR) Message;
|
|
|
|
|
|
|
|
while (*pch != 0)
|
|
|
|
{
|
|
|
|
if (*pch == '\n')
|
|
|
|
{
|
|
|
|
KdPortPutByteEx(&SerialPortInfo, '\r');
|
|
|
|
}
|
|
|
|
KdPortPutByteEx(&SerialPortInfo, *pch);
|
|
|
|
pch++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
STDCALL
|
|
|
|
KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable,
|
|
|
|
ULONG BootPhase)
|
|
|
|
{
|
|
|
|
if (!KdpDebugMode.Serial) return;
|
|
|
|
|
|
|
|
if (BootPhase == 0)
|
|
|
|
{
|
|
|
|
/* Write out the functions that we support for now */
|
|
|
|
DispatchTable->KdpInitRoutine = KdpSerialInit;
|
|
|
|
DispatchTable->KdpPrintRoutine = KdpSerialDebugPrint;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Initialize the Port */
|
2005-10-02 09:42:12 +00:00
|
|
|
if (!KdPortInitializeEx(&SerialPortInfo, 0, 0))
|
|
|
|
{
|
|
|
|
KdpDebugMode.Serial = FALSE;
|
|
|
|
return;
|
|
|
|
}
|
2007-07-08 20:13:20 +00:00
|
|
|
*KdComPortInUse = (PUCHAR)(ULONG_PTR)SerialPortInfo.BaseAddress;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Register as a Provider */
|
|
|
|
InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);
|
2006-10-02 05:40:36 +00:00
|
|
|
|
2006-09-24 07:38:53 +00:00
|
|
|
/* Display separator + ReactOS version at start of the debug log */
|
2006-10-02 05:40:36 +00:00
|
|
|
DPRINT1("-----------------------------------------------------\n");
|
2006-09-24 07:38:53 +00:00
|
|
|
DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n");
|
2006-10-02 05:40:36 +00:00
|
|
|
DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions);
|
|
|
|
DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName,
|
|
|
|
KeLoaderBlock->NtHalPathName,
|
|
|
|
KeLoaderBlock->ArcHalDeviceName,
|
|
|
|
KeLoaderBlock->NtBootPathName);
|
2005-04-25 14:44:48 +00:00
|
|
|
}
|
|
|
|
else if (BootPhase == 2)
|
|
|
|
{
|
|
|
|
HalDisplayString("\n Serial debugging enabled\n\n");
|
2005-05-09 01:38:29 +00:00
|
|
|
}
|
2005-04-25 14:44:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* SCREEN FUNCTIONS **********************************************************/
|
|
|
|
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
VOID
|
|
|
|
STDCALL
|
|
|
|
KdpScreenPrint(LPSTR Message,
|
|
|
|
ULONG Length)
|
|
|
|
{
|
|
|
|
/* Call HAL */
|
|
|
|
HalDisplayString(Message);
|
|
|
|
}
|
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
VOID
|
|
|
|
STDCALL
|
|
|
|
KdpScreenInit(PKD_DISPATCH_TABLE DispatchTable,
|
|
|
|
ULONG BootPhase)
|
|
|
|
{
|
|
|
|
if (!KdpDebugMode.Screen) return;
|
|
|
|
|
|
|
|
if (BootPhase == 0)
|
|
|
|
{
|
|
|
|
/* Write out the functions that we support for now */
|
|
|
|
DispatchTable->KdpInitRoutine = KdpScreenInit;
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
DispatchTable->KdpPrintRoutine = KdpScreenPrint;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Register as a Provider */
|
|
|
|
InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);
|
|
|
|
}
|
|
|
|
else if (BootPhase == 2)
|
|
|
|
{
|
|
|
|
HalDisplayString("\n Screen debugging enabled\n\n");
|
2005-05-09 01:38:29 +00:00
|
|
|
}
|
2005-04-25 14:44:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* GENERAL FUNCTIONS *********************************************************/
|
|
|
|
|
|
|
|
ULONG
|
|
|
|
STDCALL
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
KdpPrintString(LPSTR String,
|
|
|
|
ULONG Length)
|
2005-04-25 14:44:48 +00:00
|
|
|
{
|
|
|
|
PLIST_ENTRY CurrentEntry;
|
|
|
|
PKD_DISPATCH_TABLE CurrentTable;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-11-21 18:38:09 +00:00
|
|
|
if (!KdpDebugMode.Value) return 0;
|
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Call the registered handlers */
|
|
|
|
CurrentEntry = KdProviders.Flink;
|
|
|
|
while (CurrentEntry != &KdProviders)
|
|
|
|
{
|
|
|
|
/* Get the current table */
|
2005-05-09 01:38:29 +00:00
|
|
|
CurrentTable = CONTAINING_RECORD(CurrentEntry,
|
2005-04-25 14:44:48 +00:00
|
|
|
KD_DISPATCH_TABLE,
|
|
|
|
KdProvidersList);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Call it */
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
CurrentTable->KdpPrintRoutine(String, Length);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Next Table */
|
|
|
|
CurrentEntry = CurrentEntry->Flink;
|
|
|
|
}
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Call the Wrapper Routine */
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
if (WrapperInitRoutine) WrapperTable.KdpPrintRoutine(String, Length);
|
2005-04-25 14:44:48 +00:00
|
|
|
|
|
|
|
/* Return the Length */
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
return Length;
|
2005-04-25 14:44:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|
|
|
|
|