mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 12:14:32 +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>
|
#include <asm.inc>
|
||||||
|
|
||||||
/* GLOBALS ****************************************************************/
|
|
||||||
|
|
||||||
PUBLIC DbgBreakPoint
|
|
||||||
PUBLIC DbgBreakPointWithStatus
|
|
||||||
PUBLIC DbgUserBreakPoint
|
|
||||||
PUBLIC DebugService
|
|
||||||
PUBLIC DebugService2
|
|
||||||
PUBLIC RtlpBreakWithStatusInstruction
|
|
||||||
|
|
||||||
/* FUNCTIONS ***************************************************************/
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
|
||||||
.code64
|
.code64
|
||||||
|
|
||||||
|
PUBLIC DbgUserBreakPoint
|
||||||
DbgUserBreakPoint:
|
DbgUserBreakPoint:
|
||||||
|
PUBLIC DbgBreakPoint
|
||||||
.PROC DbgBreakPoint
|
.PROC DbgBreakPoint
|
||||||
.endprolog
|
.endprolog
|
||||||
int 3
|
int 3
|
||||||
ret
|
ret
|
||||||
.ENDP
|
.ENDP
|
||||||
|
|
||||||
|
PUBLIC RtlpBreakWithStatusInstruction
|
||||||
|
RtlpBreakWithStatusInstruction:
|
||||||
|
PUBLIC DbgBreakPointWithStatus
|
||||||
.PROC DbgBreakPointWithStatus
|
.PROC DbgBreakPointWithStatus
|
||||||
.endprolog
|
|
||||||
mov eax, ecx
|
|
||||||
.ENDP
|
|
||||||
|
|
||||||
.PROC RtlpBreakWithStatusInstruction
|
|
||||||
.endprolog
|
.endprolog
|
||||||
int 3
|
int 3
|
||||||
ret
|
ret
|
||||||
.ENDP
|
.ENDP
|
||||||
|
|
||||||
|
PUBLIC DebugService2
|
||||||
DebugService2:
|
DebugService2:
|
||||||
|
|
||||||
/* Pass the service number in eax */
|
/* Pass the service number in eax */
|
||||||
|
@ -56,6 +48,7 @@ DebugService2:
|
||||||
* IN PVOID Argument1, // <r9> = [rsp + 32]
|
* IN PVOID Argument1, // <r9> = [rsp + 32]
|
||||||
* IN PVOID Argument2); // [rsp + 40]
|
* IN PVOID Argument2); // [rsp + 40]
|
||||||
*/
|
*/
|
||||||
|
PUBLIC DebugService
|
||||||
DebugService:
|
DebugService:
|
||||||
|
|
||||||
/* Prepare registers for interrupt */
|
/* Prepare registers for interrupt */
|
||||||
|
|
|
@ -21,11 +21,7 @@
|
||||||
LEAF_END DbgUserBreakPoint
|
LEAF_END DbgUserBreakPoint
|
||||||
|
|
||||||
LEAF_ENTRY DbgBreakPointWithStatus
|
LEAF_ENTRY DbgBreakPointWithStatus
|
||||||
__debugbreak
|
ALTERNATE_ENTRY RtlpBreakWithStatusInstruction
|
||||||
bx lr
|
|
||||||
LEAF_END
|
|
||||||
|
|
||||||
LEAF_ENTRY RtlpBreakWithStatusInstruction
|
|
||||||
__debugbreak
|
__debugbreak
|
||||||
bx lr
|
bx lr
|
||||||
LEAF_END
|
LEAF_END
|
||||||
|
|
Loading…
Reference in a new issue