[NTOS:KD] Merge KdpReport() with kd64 version

This commit is contained in:
Hervé Poussineau 2020-03-08 23:16:43 +01:00
parent a8662c73a5
commit 329b9fa2fb
4 changed files with 22 additions and 23 deletions

View file

@ -281,6 +281,10 @@ NTAPI
KdpReportExceptionStateChange(
IN PEXCEPTION_RECORD ExceptionRecord,
IN OUT PCONTEXT Context,
#ifndef _WINKD_
IN PKTRAP_FRAME TrapFrame,
IN KPROCESSOR_MODE PreviousMode,
#endif
IN BOOLEAN SecondChanceException
);

View file

@ -52,15 +52,13 @@ KdpReportLoadSymbolsStateChange(IN PSTRING PathName,
BOOLEAN
NTAPI
KdpReport(IN PKTRAP_FRAME TrapFrame,
IN PKEXCEPTION_FRAME ExceptionFrame,
IN PEXCEPTION_RECORD ExceptionRecord,
IN PCONTEXT ContextRecord,
IN KPROCESSOR_MODE PreviousMode,
IN BOOLEAN SecondChanceException)
KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord,
IN OUT PCONTEXT ContextRecord,
IN PKTRAP_FRAME TrapFrame,
IN KPROCESSOR_MODE PreviousMode,
IN BOOLEAN SecondChanceException)
{
KD_CONTINUE_TYPE Return = kdHandleException;
#ifdef KDBG
/* Check if this is an assertion failure */
if (ExceptionRecord->ExceptionCode == STATUS_ASSERTION_FAILURE)
@ -288,6 +286,9 @@ KdDebuggerInitialize1(
/* Call the Wrapper Init Routine */
if (WrapperInitRoutine)
WrapperTable.KdpInitRoutine(&WrapperTable, 1);
NtGlobalFlag |= FLG_STOP_ON_EXCEPTION;
return STATUS_SUCCESS;
}

View file

@ -1728,13 +1728,13 @@ KdpReportCommandStringStateChange(IN PSTRING NameString,
}
#endif
#ifdef _WINKD_
BOOLEAN
NTAPI
KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord,
IN OUT PCONTEXT Context,
IN BOOLEAN SecondChanceException)
{
#ifdef _WINKD_
STRING Header, Data;
DBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange;
KCONTINUE_STATUS Status;
@ -1782,11 +1782,8 @@ KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord,
/* Return */
return Status;
#else
UNIMPLEMENTED;
return FALSE;
#endif
}
#endif
VOID
NTAPI
@ -1850,6 +1847,10 @@ KdpSwitchProcessor(IN PEXCEPTION_RECORD ExceptionRecord,
/* Report a state change */
Status = KdpReportExceptionStateChange(ExceptionRecord,
ContextRecord,
#ifndef _WINKD_
NULL,
KernelMode,
#endif
SecondChanceException);
/* Restore the port data and return */

View file

@ -47,16 +47,6 @@
/* FUNCTIONS *****************************************************************/
#ifndef _WINKD_
BOOLEAN
NTAPI
KdpReport(IN PKTRAP_FRAME TrapFrame,
IN PKEXCEPTION_FRAME ExceptionFrame,
IN PEXCEPTION_RECORD ExceptionRecord,
IN PCONTEXT ContextRecord,
IN KPROCESSOR_MODE PreviousMode,
IN BOOLEAN SecondChanceException);
#else
BOOLEAN
NTAPI
KdpReport(IN PKTRAP_FRAME TrapFrame,
@ -126,6 +116,10 @@ KdpReport(IN PKTRAP_FRAME TrapFrame,
Handled = KdpReportExceptionStateChange(ExceptionRecord,
&Prcb->ProcessorState.
ContextFrame,
#ifndef _WINKD_
TrapFrame,
PreviousMode,
#endif
SecondChanceException);
/* Now restore the processor state, manually again. */
@ -139,7 +133,6 @@ KdpReport(IN PKTRAP_FRAME TrapFrame,
KdpControlCPressed = FALSE;
return Handled;
}
#endif
BOOLEAN
NTAPI