[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:
Hermès Bélusca-Maïto 2013-05-05 21:57:42 +00:00
parent dff2ca4ea0
commit a23361e756
4 changed files with 125 additions and 177 deletions

View file

@ -9,6 +9,7 @@ elseif(ARCH STREQUAL "arm")
list(APPEND SOURCE arm/kdbg.c)
endif(ARCH STREQUAL "i386")
list(APPEND SOURCE
kdrosdbg.c
kdrosdbg.rc
${CMAKE_CURRENT_BINARY_DIR}/kdcom.def)

View file

@ -10,16 +10,17 @@
#define NOEXTAPI
#include <ntifs.h>
#define NDEBUG
#include <halfuncs.h>
#include <stdio.h>
#include <debug.h>
#include "arc/arc.h"
#include "windbgkd.h"
#include <arc/arc.h>
#include <windbgkd.h>
#include <kddll.h>
#include <ioaccess.h>
#include <arm/peripherals/pl011.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
typedef struct _KD_PORT_INFORMATION
@ -117,79 +118,4 @@ KdPortPutByteEx(IN PKD_PORT_INFORMATION PortInformation,
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 */

View file

@ -13,8 +13,8 @@
#include <ntifs.h>
#include <halfuncs.h>
#include <stdio.h>
#include "arc/arc.h"
#include "windbgkd.h"
#include <arc/arc.h>
#include <windbgkd.h>
#include <kddll.h>
#include <ioaccess.h> /* port intrinsics */
#include <cportlib/cportlib.h>
@ -98,9 +98,8 @@ const ULONG BaseArray[] = {0, 0xF1012000};
// static BOOLEAN PortInitialized = FALSE;
/* FUNCTIONS ****************************************************************/
/* REACTOS FUNCTIONS **********************************************************/
/* ReactOS-specific */
BOOLEAN
NTAPI
KdPortInitializeEx(
@ -229,8 +228,6 @@ KdPortInitializeEx(
return TRUE;
}
/* ReactOS-specific */
BOOLEAN
NTAPI
KdPortGetByteEx(
@ -248,7 +245,6 @@ KdPortGetByteEx(
return FALSE;
}
/* ReactOS-specific */
VOID
NTAPI
KdPortPutByteEx(
@ -263,95 +259,4 @@ KdPortPutByteEx(
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 */

View 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 */