2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Run-Time Library
4 * PURPOSE: Debug Routines
5 * FILE: lib/rtl/i386/debug.S
6 * PROGRAMER: Timo Kreuzer (timo.kreuzer@reactos.org)
9 #include <reactos/asm.h>
11 /* GLOBALS ****************************************************************/
14 PUBLIC DbgBreakPointWithStatus
15 PUBLIC DbgUserBreakPoint
18 PUBLIC DbgBreakPointNoBugCheck
19 PUBLIC RtlpBreakWithStatusInstruction
21 /* FUNCTIONS ***************************************************************/
25 DbgBreakPointNoBugCheck:
34 DbgBreakPointWithStatus:
36 RtlpBreakWithStatusInstruction:
42 /* Call the interrupt */
48 /******************************************************************************
49 * NTSTATUS NTAPI DebugService(
50 * IN ULONG Service, // <rcx> = [rsp + 8]
51 * IN PVOID Buffer, // <rdx> = [rsp + 16]
52 * IN ULONG Length, // <r8> = [rsp + 24]
53 * IN PVOID Argument1, // <r9> = [rsp + 32]
54 * IN PVOID Argument2); // [rsp + 40]
58 /* Prepare registers for interrupt */
59 mov eax, ecx // Service
60 mov rcx, rdx // Buffer
61 mov edx, r8d // Length
62 mov r8, r9 // Argument1
63 mov r9, [rsp + 40] // Argument2
65 /* Call the Interrupt */