[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:
Hermès Bélusca-Maïto 2025-04-19 18:00:12 +02:00
parent a7d86fe3a7
commit 005f75bd61
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 8 additions and 19 deletions

View file

@ -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