mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- Fix KiDebugService to load EDX from KTRAP_FRAME_EDX, not KTRAP_FRAME_EAX!.
- Fix CommonDispatchException to check for the argument count in ECX, not EAX. Previously we were ignoring parameter counts and never filling out exception records! - Fix DebugPrint to be the same in user-mode and kernel-mode by using DebugService. This now works because the bugs above were fixed. svn path=/branches/alex-kd-branch/; revision=25836
This commit is contained in:
parent
ff6bd309f3
commit
ee1892a1a9
4 changed files with 10 additions and 48 deletions
|
@ -14,28 +14,6 @@
|
|||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DebugService(IN ULONG Service,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Length,
|
||||
IN PVOID Argument1,
|
||||
IN PVOID Argument2);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DebugPrint(IN PANSI_STRING DebugString,
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level)
|
||||
{
|
||||
/* Call the INT2D Service */
|
||||
return DebugService(BREAKPOINT_PRINT,
|
||||
DebugString->Buffer,
|
||||
DebugString->Length,
|
||||
UlongToPtr(ComponentId),
|
||||
UlongToPtr(Level));
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
|
|
@ -16,13 +16,14 @@
|
|||
|
||||
/* PRIVATE FUNCTIONS ********************************************************/
|
||||
|
||||
#if 0
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DebugPrint(IN PANSI_STRING DebugString,
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level)
|
||||
{
|
||||
return STATUS_SUCCESS;
|
||||
|
||||
/* Call the INT2D Service */
|
||||
return DebugService(BREAKPOINT_PRINT,
|
||||
DebugString->Buffer,
|
||||
|
@ -30,13 +31,6 @@ DebugPrint(IN PANSI_STRING DebugString,
|
|||
UlongToPtr(ComponentId),
|
||||
UlongToPtr(Level));
|
||||
}
|
||||
#else
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DebugPrint(IN PANSI_STRING DebugString,
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level);
|
||||
#endif
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
|
|
@ -471,7 +471,7 @@ _KiDebugService:
|
|||
/* Call debug service dispatcher */
|
||||
mov eax, [ebp+KTRAP_FRAME_EAX]
|
||||
mov ecx, [ebp+KTRAP_FRAME_ECX]
|
||||
mov edx, [ebp+KTRAP_FRAME_EAX]
|
||||
mov edx, [ebp+KTRAP_FRAME_EDX]
|
||||
|
||||
/* Jump to INT3 handler */
|
||||
jmp PrepareInt3
|
||||
|
@ -591,7 +591,7 @@ _CommonDispatchException:
|
|||
mov [esp+EXCEPTION_RECORD_NUMBER_PARAMETERS], ecx
|
||||
|
||||
/* Check parameter count */
|
||||
cmp eax, 0
|
||||
cmp ecx, 0
|
||||
jz NoParams
|
||||
|
||||
/* Get information */
|
||||
|
@ -613,9 +613,11 @@ NoParams:
|
|||
|
||||
SetPreviousMode:
|
||||
|
||||
/* Calculate the previous mode */
|
||||
/* Get the caller's CS */
|
||||
mov eax, [ebp+KTRAP_FRAME_CS]
|
||||
|
||||
MaskMode:
|
||||
/* Check if it was user-mode or kernel-mode */
|
||||
and eax, MODE_MASK
|
||||
|
||||
/* Dispatch the exception */
|
||||
|
@ -797,8 +799,8 @@ PrepInt3:
|
|||
/* Setup EIP, NTSTATUS and parameter count, then dispatch */
|
||||
mov ebx, [ebp+KTRAP_FRAME_EIP]
|
||||
dec ebx
|
||||
mov eax, STATUS_BREAKPOINT
|
||||
mov ecx, 3
|
||||
mov eax, STATUS_BREAKPOINT
|
||||
call _CommonDispatchException
|
||||
|
||||
V86Int3:
|
||||
|
|
|
@ -23,18 +23,6 @@ extern ULONG NtOSCSDVersion;
|
|||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DebugPrint(IN PANSI_STRING DebugString,
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level)
|
||||
{
|
||||
/* Temporary hack */
|
||||
//KdpPrintString(DebugString->Buffer, DebugString->Length);
|
||||
//HalDisplayString((PCHAR)DebugString->Buffer);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue