mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 04:03:56 +00:00
[RTL] x64/ARM: Alias RtlpBreakWithStatusInstruction to DbgBreakPointWithStatus; x64: fix a bug.
RtlpBreakWithStatusInstruction is just a label for KD. On machines that have register calling conventions (basically all except x86), the `Status` parameter for `DbgBreakPointWithStatus` is stored in the first argument register. https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-dbgbreakpointwithstatus On the x64 platform, `DbgBreakPointWithStatus` only uses the ECX register and leaves EAX untouched. Verified on Windows.
This commit is contained in:
parent
a7d86fe3a7
commit
005f75bd61
2 changed files with 8 additions and 19 deletions
|
@ -8,37 +8,29 @@
|
|||
|
||||
#include <asm.inc>
|
||||
|
||||
/* GLOBALS ****************************************************************/
|
||||
|
||||
PUBLIC DbgBreakPoint
|
||||
PUBLIC DbgBreakPointWithStatus
|
||||
PUBLIC DbgUserBreakPoint
|
||||
PUBLIC DebugService
|
||||
PUBLIC DebugService2
|
||||
PUBLIC RtlpBreakWithStatusInstruction
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
.code64
|
||||
|
||||
PUBLIC DbgUserBreakPoint
|
||||
DbgUserBreakPoint:
|
||||
PUBLIC DbgBreakPoint
|
||||
.PROC DbgBreakPoint
|
||||
.endprolog
|
||||
int 3
|
||||
ret
|
||||
.ENDP
|
||||
|
||||
PUBLIC RtlpBreakWithStatusInstruction
|
||||
RtlpBreakWithStatusInstruction:
|
||||
PUBLIC DbgBreakPointWithStatus
|
||||
.PROC DbgBreakPointWithStatus
|
||||
.endprolog
|
||||
mov eax, ecx
|
||||
.ENDP
|
||||
|
||||
.PROC RtlpBreakWithStatusInstruction
|
||||
.endprolog
|
||||
int 3
|
||||
ret
|
||||
.ENDP
|
||||
|
||||
PUBLIC DebugService2
|
||||
DebugService2:
|
||||
|
||||
/* Pass the service number in eax */
|
||||
|
@ -56,6 +48,7 @@ DebugService2:
|
|||
* IN PVOID Argument1, // <r9> = [rsp + 32]
|
||||
* IN PVOID Argument2); // [rsp + 40]
|
||||
*/
|
||||
PUBLIC DebugService
|
||||
DebugService:
|
||||
|
||||
/* Prepare registers for interrupt */
|
||||
|
|
|
@ -21,11 +21,7 @@
|
|||
LEAF_END DbgUserBreakPoint
|
||||
|
||||
LEAF_ENTRY DbgBreakPointWithStatus
|
||||
__debugbreak
|
||||
bx lr
|
||||
LEAF_END
|
||||
|
||||
LEAF_ENTRY RtlpBreakWithStatusInstruction
|
||||
ALTERNATE_ENTRY RtlpBreakWithStatusInstruction
|
||||
__debugbreak
|
||||
bx lr
|
||||
LEAF_END
|
||||
|
|
Loading…
Reference in a new issue