mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:25:41 +00:00
[NTOS:KD] Remove useless variables/members
Those where only set and never read.
This commit is contained in:
parent
8d3a395101
commit
95faf65ebf
4 changed files with 2 additions and 96 deletions
|
@ -105,18 +105,6 @@ VOID
|
||||||
ULONG Length
|
ULONG Length
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
|
||||||
VOID
|
|
||||||
(NTAPI*PKDP_PROMPT_ROUTINE)(PCH String);
|
|
||||||
|
|
||||||
typedef
|
|
||||||
KD_CONTINUE_TYPE
|
|
||||||
(NTAPI*PKDP_EXCEPTION_ROUTINE)(
|
|
||||||
PEXCEPTION_RECORD ExceptionRecord,
|
|
||||||
PCONTEXT Context,
|
|
||||||
PKTRAP_FRAME TrapFrame
|
|
||||||
);
|
|
||||||
|
|
||||||
/* INIT ROUTINES *************************************************************/
|
/* INIT ROUTINES *************************************************************/
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
@ -239,19 +227,11 @@ typedef struct _KD_DISPATCH_TABLE
|
||||||
LIST_ENTRY KdProvidersList;
|
LIST_ENTRY KdProvidersList;
|
||||||
PKDP_INIT_ROUTINE KdpInitRoutine;
|
PKDP_INIT_ROUTINE KdpInitRoutine;
|
||||||
PKDP_PRINT_ROUTINE KdpPrintRoutine;
|
PKDP_PRINT_ROUTINE KdpPrintRoutine;
|
||||||
PKDP_PROMPT_ROUTINE KdpPromptRoutine;
|
|
||||||
PKDP_EXCEPTION_ROUTINE KdpExceptionRoutine;
|
|
||||||
} KD_DISPATCH_TABLE, *PKD_DISPATCH_TABLE;
|
} KD_DISPATCH_TABLE, *PKD_DISPATCH_TABLE;
|
||||||
|
|
||||||
/* The current Debugging Mode */
|
/* The current Debugging Mode */
|
||||||
extern KDP_DEBUG_MODE KdpDebugMode;
|
extern KDP_DEBUG_MODE KdpDebugMode;
|
||||||
|
|
||||||
/* The current Port IRQ */
|
|
||||||
extern ULONG KdpPortIrq;
|
|
||||||
|
|
||||||
/* The current Port */
|
|
||||||
extern ULONG KdpPort;
|
|
||||||
|
|
||||||
/* Port Information for the Serial Native Mode */
|
/* Port Information for the Serial Native Mode */
|
||||||
extern ULONG SerialPortNumber;
|
extern ULONG SerialPortNumber;
|
||||||
extern CPPORT SerialPortInfo;
|
extern CPPORT SerialPortInfo;
|
||||||
|
@ -259,15 +239,9 @@ extern CPPORT SerialPortInfo;
|
||||||
/* Init Functions for Native Providers */
|
/* Init Functions for Native Providers */
|
||||||
extern PKDP_INIT_ROUTINE InitRoutines[KdMax];
|
extern PKDP_INIT_ROUTINE InitRoutines[KdMax];
|
||||||
|
|
||||||
/* Wrapper Init Function */
|
|
||||||
extern PKDP_INIT_ROUTINE WrapperInitRoutine;
|
|
||||||
|
|
||||||
/* Dispatch Tables for Native Providers */
|
/* Dispatch Tables for Native Providers */
|
||||||
extern KD_DISPATCH_TABLE DispatchTable[KdMax];
|
extern KD_DISPATCH_TABLE DispatchTable[KdMax];
|
||||||
|
|
||||||
/* Dispatch Table for the Wrapper */
|
|
||||||
extern KD_DISPATCH_TABLE WrapperTable;
|
|
||||||
|
|
||||||
/* The KD Native Provider List */
|
/* The KD Native Provider List */
|
||||||
extern LIST_ENTRY KdProviders;
|
extern LIST_ENTRY KdProviders;
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,6 @@ static KSPIN_LOCK KdpSerialSpinLock;
|
||||||
ULONG SerialPortNumber = DEFAULT_DEBUG_PORT;
|
ULONG SerialPortNumber = DEFAULT_DEBUG_PORT;
|
||||||
CPPORT SerialPortInfo = {0, DEFAULT_DEBUG_BAUD_RATE, 0};
|
CPPORT SerialPortInfo = {0, DEFAULT_DEBUG_BAUD_RATE, 0};
|
||||||
|
|
||||||
/* Current Port in use. FIXME: Do we support more than one? */
|
|
||||||
ULONG KdpPort;
|
|
||||||
|
|
||||||
#define KdpScreenLineLengthDefault 80
|
#define KdpScreenLineLengthDefault 80
|
||||||
static CHAR KdpScreenLineBuffer[KdpScreenLineLengthDefault + 1] = "";
|
static CHAR KdpScreenLineBuffer[KdpScreenLineLengthDefault + 1] = "";
|
||||||
static ULONG KdpScreenLineBufferPos = 0, KdpScreenLineLength = 0;
|
static ULONG KdpScreenLineBufferPos = 0, KdpScreenLineLength = 0;
|
||||||
|
@ -543,11 +540,6 @@ KdSendPacket(
|
||||||
/* Next Table */
|
/* Next Table */
|
||||||
CurrentEntry = CurrentEntry->Flink;
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the Wrapper Routine */
|
|
||||||
if (WrapperTable.KdpPrintRoutine)
|
|
||||||
WrapperTable.KdpPrintRoutine(Output->Buffer, Output->Length);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (PacketType == PACKET_TYPE_KD_STATE_CHANGE64)
|
else if (PacketType == PACKET_TYPE_KD_STATE_CHANGE64)
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads);
|
VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads);
|
||||||
|
|
||||||
extern CPPORT PortInfo;
|
|
||||||
extern ANSI_STRING KdpLogFileName;
|
extern ANSI_STRING KdpLogFileName;
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS *********************************************************/
|
/* PRIVATE FUNCTIONS *********************************************************/
|
||||||
|
@ -49,14 +48,6 @@ KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord,
|
||||||
TrapFrame,
|
TrapFrame,
|
||||||
!SecondChanceException);
|
!SecondChanceException);
|
||||||
#else /* not KDBG */
|
#else /* not KDBG */
|
||||||
if (WrapperInitRoutine)
|
|
||||||
{
|
|
||||||
/* Call GDB */
|
|
||||||
Return = WrapperTable.KdpExceptionRoutine(ExceptionRecord,
|
|
||||||
ContextRecord,
|
|
||||||
TrapFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We'll manually dump the stack for the user... */
|
/* We'll manually dump the stack for the user... */
|
||||||
KeRosDumpStackFrames(NULL, 0);
|
KeRosDumpStackFrames(NULL, 0);
|
||||||
#endif /* not KDBG */
|
#endif /* not KDBG */
|
||||||
|
@ -99,7 +90,6 @@ KdpGetDebugMode(PCHAR Currentp2)
|
||||||
|
|
||||||
/* Set the port to use */
|
/* Set the port to use */
|
||||||
SerialPortNumber = Value;
|
SerialPortNumber = Value;
|
||||||
KdpPort = Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -110,7 +100,6 @@ KdpGetDebugMode(PCHAR Currentp2)
|
||||||
KdpDebugMode.Serial = TRUE;
|
KdpDebugMode.Serial = TRUE;
|
||||||
SerialPortInfo.Address = UlongToPtr(Value);
|
SerialPortInfo.Address = UlongToPtr(Value);
|
||||||
SerialPortNumber = 0;
|
SerialPortNumber = 0;
|
||||||
KdpPort = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,9 +127,8 @@ NTAPI
|
||||||
KdDebuggerInitialize0(
|
KdDebuggerInitialize0(
|
||||||
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
||||||
{
|
{
|
||||||
ULONG Value;
|
|
||||||
ULONG i;
|
ULONG i;
|
||||||
PCHAR CommandLine, Port = NULL, BaudRate = NULL, Irq = NULL;
|
PCHAR CommandLine, Port = NULL;
|
||||||
|
|
||||||
if (LoaderBlock)
|
if (LoaderBlock)
|
||||||
{
|
{
|
||||||
|
@ -156,10 +144,8 @@ KdDebuggerInitialize0(
|
||||||
KdbpGetCommandLineSettings(CommandLine);
|
KdbpGetCommandLineSettings(CommandLine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Get the port and baud rate */
|
/* Get the port */
|
||||||
Port = strstr(CommandLine, "DEBUGPORT");
|
Port = strstr(CommandLine, "DEBUGPORT");
|
||||||
BaudRate = strstr(CommandLine, "BAUDRATE");
|
|
||||||
Irq = strstr(CommandLine, "IRQ");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,42 +168,6 @@ KdDebuggerInitialize0(
|
||||||
if (KdpDebugMode.Value == 0)
|
if (KdpDebugMode.Value == 0)
|
||||||
KdpDebugMode.Serial = TRUE;
|
KdpDebugMode.Serial = TRUE;
|
||||||
|
|
||||||
/* Check if we got a baud rate */
|
|
||||||
if (BaudRate)
|
|
||||||
{
|
|
||||||
/* Move past the actual string, to reach the rate */
|
|
||||||
BaudRate += sizeof("BAUDRATE") - 1;
|
|
||||||
|
|
||||||
/* Now get past any spaces */
|
|
||||||
while (*BaudRate == ' ') BaudRate++;
|
|
||||||
|
|
||||||
/* And make sure we have a rate */
|
|
||||||
if (*BaudRate)
|
|
||||||
{
|
|
||||||
/* Read and set it */
|
|
||||||
Value = atol(BaudRate + 1);
|
|
||||||
if (Value) PortInfo.BaudRate = SerialPortInfo.BaudRate = Value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check Serial Port Settings [IRQ] */
|
|
||||||
if (Irq)
|
|
||||||
{
|
|
||||||
/* Move past the actual string, to reach the rate */
|
|
||||||
Irq += sizeof("IRQ") - 1;
|
|
||||||
|
|
||||||
/* Now get past any spaces */
|
|
||||||
while (*Irq == ' ') Irq++;
|
|
||||||
|
|
||||||
/* And make sure we have an IRQ */
|
|
||||||
if (*Irq)
|
|
||||||
{
|
|
||||||
/* Read and set it */
|
|
||||||
Value = atol(Irq + 1);
|
|
||||||
if (Value) KdpPortIrq = Value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Call Providers at Phase 0 */
|
/* Call Providers at Phase 0 */
|
||||||
for (i = 0; i < KdMax; i++)
|
for (i = 0; i < KdMax; i++)
|
||||||
{
|
{
|
||||||
|
@ -251,10 +201,6 @@ KdDebuggerInitialize1(
|
||||||
CurrentEntry = CurrentEntry->Flink;
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the Wrapper Init Routine */
|
|
||||||
if (WrapperInitRoutine)
|
|
||||||
WrapperTable.KdpInitRoutine(&WrapperTable, 1);
|
|
||||||
|
|
||||||
NtGlobalFlag |= FLG_STOP_ON_EXCEPTION;
|
NtGlobalFlag |= FLG_STOP_ON_EXCEPTION;
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
|
|
@ -138,13 +138,7 @@ ULONG KdPrintBufferSize = sizeof(KdPrintDefaultCircularBuffer);
|
||||||
ULONG KdPrintBufferChanges = 0;
|
ULONG KdPrintBufferChanges = 0;
|
||||||
|
|
||||||
#ifndef _WINKD_
|
#ifndef _WINKD_
|
||||||
/* Make bochs debug output in the very early boot phase available */
|
|
||||||
ULONG PortNumber = DEFAULT_DEBUG_PORT;
|
|
||||||
CPPORT PortInfo = {0, DEFAULT_DEBUG_BAUD_RATE, 0};
|
|
||||||
ULONG KdpPortIrq;
|
|
||||||
KDP_DEBUG_MODE KdpDebugMode;
|
KDP_DEBUG_MODE KdpDebugMode;
|
||||||
PKDP_INIT_ROUTINE WrapperInitRoutine;
|
|
||||||
KD_DISPATCH_TABLE WrapperTable;
|
|
||||||
LIST_ENTRY KdProviders = {&KdProviders, &KdProviders};
|
LIST_ENTRY KdProviders = {&KdProviders, &KdProviders};
|
||||||
KD_DISPATCH_TABLE DispatchTable[KdMax];
|
KD_DISPATCH_TABLE DispatchTable[KdMax];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue