mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:03:12 +00:00
[KDROSDBG]
Place the (unimplemented) real KD functions into a dedicated file and isolate ReactOS-specific port functions. They can go into a libary along KDBG ! svn path=/branches/kd++/; revision=58958
This commit is contained in:
parent
dff2ca4ea0
commit
a23361e756
4 changed files with 125 additions and 177 deletions
|
@ -9,6 +9,7 @@ elseif(ARCH STREQUAL "arm")
|
||||||
list(APPEND SOURCE arm/kdbg.c)
|
list(APPEND SOURCE arm/kdbg.c)
|
||||||
endif(ARCH STREQUAL "i386")
|
endif(ARCH STREQUAL "i386")
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
|
kdrosdbg.c
|
||||||
kdrosdbg.rc
|
kdrosdbg.rc
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/kdcom.def)
|
${CMAKE_CURRENT_BINARY_DIR}/kdcom.def)
|
||||||
|
|
||||||
|
|
|
@ -10,16 +10,17 @@
|
||||||
|
|
||||||
#define NOEXTAPI
|
#define NOEXTAPI
|
||||||
#include <ntifs.h>
|
#include <ntifs.h>
|
||||||
#define NDEBUG
|
|
||||||
#include <halfuncs.h>
|
#include <halfuncs.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <debug.h>
|
#include <arc/arc.h>
|
||||||
#include "arc/arc.h"
|
#include <windbgkd.h>
|
||||||
#include "windbgkd.h"
|
|
||||||
#include <kddll.h>
|
#include <kddll.h>
|
||||||
#include <ioaccess.h>
|
#include <ioaccess.h>
|
||||||
#include <arm/peripherals/pl011.h>
|
#include <arm/peripherals/pl011.h>
|
||||||
|
|
||||||
|
#define NDEBUG
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
/* GLOBALS ********************************************************************/
|
/* GLOBALS ********************************************************************/
|
||||||
|
|
||||||
typedef struct _KD_PORT_INFORMATION
|
typedef struct _KD_PORT_INFORMATION
|
||||||
|
@ -117,79 +118,4 @@ KdPortPutByteEx(IN PKD_PORT_INFORMATION PortInformation,
|
||||||
WRITE_REGISTER_ULONG(UART_PL01x_DR, ByteToSend);
|
WRITE_REGISTER_ULONG(UART_PL01x_DR, ByteToSend);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WINDOWS FUNCTIONS **********************************************************/
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdDebuggerInitialize0(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdDebuggerInitialize1(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdD0Transition(VOID)
|
|
||||||
{
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdD3Transition(VOID)
|
|
||||||
{
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdSave(IN BOOLEAN SleepTransition)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
while (TRUE);
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdRestore(IN BOOLEAN SleepTransition)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
while (TRUE);
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
NTAPI
|
|
||||||
KdSendPacket(IN ULONG PacketType,
|
|
||||||
IN PSTRING MessageHeader,
|
|
||||||
IN PSTRING MessageData,
|
|
||||||
IN OUT PKD_CONTEXT Context)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
while (TRUE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
KDSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdReceivePacket(IN ULONG PacketType,
|
|
||||||
OUT PSTRING MessageHeader,
|
|
||||||
OUT PSTRING MessageData,
|
|
||||||
OUT PULONG DataLength,
|
|
||||||
IN OUT PKD_CONTEXT Context)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
while (TRUE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
#include <ntifs.h>
|
#include <ntifs.h>
|
||||||
#include <halfuncs.h>
|
#include <halfuncs.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "arc/arc.h"
|
#include <arc/arc.h>
|
||||||
#include "windbgkd.h"
|
#include <windbgkd.h>
|
||||||
#include <kddll.h>
|
#include <kddll.h>
|
||||||
#include <ioaccess.h> /* port intrinsics */
|
#include <ioaccess.h> /* port intrinsics */
|
||||||
#include <cportlib/cportlib.h>
|
#include <cportlib/cportlib.h>
|
||||||
|
@ -98,9 +98,8 @@ const ULONG BaseArray[] = {0, 0xF1012000};
|
||||||
// static BOOLEAN PortInitialized = FALSE;
|
// static BOOLEAN PortInitialized = FALSE;
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* REACTOS FUNCTIONS **********************************************************/
|
||||||
|
|
||||||
/* ReactOS-specific */
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
NTAPI
|
NTAPI
|
||||||
KdPortInitializeEx(
|
KdPortInitializeEx(
|
||||||
|
@ -229,8 +228,6 @@ KdPortInitializeEx(
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ReactOS-specific */
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
NTAPI
|
NTAPI
|
||||||
KdPortGetByteEx(
|
KdPortGetByteEx(
|
||||||
|
@ -248,7 +245,6 @@ KdPortGetByteEx(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ReactOS-specific */
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KdPortPutByteEx(
|
KdPortPutByteEx(
|
||||||
|
@ -263,95 +259,4 @@ KdPortPutByteEx(
|
||||||
WRITE_PORT_UCHAR(SER_THR(ComPortBase), ByteToSend);
|
WRITE_PORT_UCHAR(SER_THR(ComPortBase), ByteToSend);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdDebuggerInitialize0(
|
|
||||||
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
|
||||||
{
|
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdDebuggerInitialize1(
|
|
||||||
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
|
||||||
{
|
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdD0Transition(VOID)
|
|
||||||
{
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdD3Transition(VOID)
|
|
||||||
{
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdSave(
|
|
||||||
IN BOOLEAN SleepTransition)
|
|
||||||
{
|
|
||||||
/* Nothing to do on COM ports */
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdRestore(
|
|
||||||
IN BOOLEAN SleepTransition)
|
|
||||||
{
|
|
||||||
/* Nothing to do on COM ports */
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
VOID
|
|
||||||
NTAPI
|
|
||||||
KdSendPacket(
|
|
||||||
IN ULONG PacketType,
|
|
||||||
IN PSTRING MessageHeader,
|
|
||||||
IN PSTRING MessageData,
|
|
||||||
IN OUT PKD_CONTEXT Context)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
KDSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdReceivePacket(
|
|
||||||
IN ULONG PacketType,
|
|
||||||
OUT PSTRING MessageHeader,
|
|
||||||
OUT PSTRING MessageData,
|
|
||||||
OUT PULONG DataLength,
|
|
||||||
IN OUT PKD_CONTEXT Context)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
116
drivers/base/kdrosdbg/kdrosdbg.c
Normal file
116
drivers/base/kdrosdbg/kdrosdbg.c
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
/*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS kernel
|
||||||
|
* FILE: drivers/base/kdcom/kdbg.c
|
||||||
|
* PURPOSE: Serial i/o functions for the kernel debugger.
|
||||||
|
* PROGRAMMER: Alex Ionescu
|
||||||
|
* Hervé Poussineau
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
|
#define NOEXTAPI
|
||||||
|
#include <ntifs.h>
|
||||||
|
#include <halfuncs.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <arc/arc.h>
|
||||||
|
#include <windbgkd.h>
|
||||||
|
#include <kddll.h>
|
||||||
|
|
||||||
|
#define NDEBUG
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
KdDebuggerInitialize0(
|
||||||
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
||||||
|
{
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
KdDebuggerInitialize1(
|
||||||
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
||||||
|
{
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
KdD0Transition(VOID)
|
||||||
|
{
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
KdD3Transition(VOID)
|
||||||
|
{
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
KdSave(
|
||||||
|
IN BOOLEAN SleepTransition)
|
||||||
|
{
|
||||||
|
/* Nothing to do on COM ports */
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
KdRestore(
|
||||||
|
IN BOOLEAN SleepTransition)
|
||||||
|
{
|
||||||
|
/* Nothing to do on COM ports */
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
KdSendPacket(
|
||||||
|
IN ULONG PacketType,
|
||||||
|
IN PSTRING MessageHeader,
|
||||||
|
IN PSTRING MessageData,
|
||||||
|
IN OUT PKD_CONTEXT Context)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
KDSTATUS
|
||||||
|
NTAPI
|
||||||
|
KdReceivePacket(
|
||||||
|
IN ULONG PacketType,
|
||||||
|
OUT PSTRING MessageHeader,
|
||||||
|
OUT PSTRING MessageData,
|
||||||
|
OUT PULONG DataLength,
|
||||||
|
IN OUT PKD_CONTEXT Context)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue