2005-12-08 23:56:12 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS Run-Time Library
|
|
|
|
* PURPOSE: Debug Routines
|
|
|
|
* FILE: lib/rtl/i386/debug.S
|
|
|
|
* PROGRAMER: Alex Ionescu (alex@relsoft.net)
|
|
|
|
*/
|
|
|
|
|
2010-11-27 22:12:15 +00:00
|
|
|
#include <asm.inc>
|
2005-12-08 23:56:12 +00:00
|
|
|
|
|
|
|
/* GLOBALS ****************************************************************/
|
|
|
|
|
2010-11-27 22:12:15 +00:00
|
|
|
PUBLIC _DbgBreakPoint@0
|
|
|
|
PUBLIC _DbgBreakPointWithStatus@4
|
|
|
|
PUBLIC _DbgUserBreakPoint@0
|
|
|
|
PUBLIC _DebugService@20
|
|
|
|
PUBLIC _DebugService2@12
|
|
|
|
PUBLIC _DbgBreakPointNoBugCheck@0
|
|
|
|
PUBLIC _RtlpBreakWithStatusInstruction@0
|
2005-12-08 23:56:12 +00:00
|
|
|
|
|
|
|
/* FUNCTIONS ***************************************************************/
|
|
|
|
|
2010-11-27 22:12:15 +00:00
|
|
|
.code
|
|
|
|
|
2011-10-13 15:16:29 +00:00
|
|
|
FUNC _DbgBreakPointNoBugCheck@0
|
2011-09-05 22:18:56 +00:00
|
|
|
FPO 0, 0, 0, 0, 0, FRAME_FPO
|
2006-08-31 18:10:11 +00:00
|
|
|
int 3
|
|
|
|
ret
|
2011-10-13 15:16:29 +00:00
|
|
|
ENDFUNC
|
2006-08-31 18:10:11 +00:00
|
|
|
|
2005-12-08 23:56:12 +00:00
|
|
|
_DbgUserBreakPoint@0:
|
2011-10-13 15:16:29 +00:00
|
|
|
FUNC _DbgBreakPoint@0
|
2011-09-05 22:18:56 +00:00
|
|
|
FPO 0, 0, 0, 0, 0, FRAME_FPO
|
2005-12-08 23:56:12 +00:00
|
|
|
int 3
|
|
|
|
ret
|
2011-10-13 15:16:29 +00:00
|
|
|
ENDFUNC
|
2006-08-31 18:10:11 +00:00
|
|
|
|
2011-10-13 15:16:29 +00:00
|
|
|
FUNC _DbgBreakPointWithStatus@4
|
2011-09-05 22:18:56 +00:00
|
|
|
FPO 0, 1, 0, 0, 0, FRAME_FPO
|
2005-12-08 23:56:12 +00:00
|
|
|
mov eax, [esp+4]
|
2011-10-13 15:16:29 +00:00
|
|
|
ENDFUNC
|
2007-02-19 18:52:23 +00:00
|
|
|
|
2011-10-13 15:16:29 +00:00
|
|
|
FUNC _RtlpBreakWithStatusInstruction@0
|
2011-09-05 22:18:56 +00:00
|
|
|
FPO 0, 0, 0, 0, 0, FRAME_FPO
|
2005-12-08 23:56:12 +00:00
|
|
|
int 3
|
|
|
|
ret 4
|
2011-10-13 15:16:29 +00:00
|
|
|
ENDFUNC
|
2005-12-08 23:56:12 +00:00
|
|
|
|
2011-10-13 15:16:29 +00:00
|
|
|
FUNC _DebugService2@12
|
2011-09-05 22:18:56 +00:00
|
|
|
FPO 0, 3, 3, 0, 1, FRAME_NONFPO
|
2007-01-24 19:48:34 +00:00
|
|
|
|
|
|
|
/* Setup the stack */
|
|
|
|
push ebp
|
|
|
|
mov ebp, esp
|
|
|
|
|
|
|
|
/* Call the interrupt */
|
|
|
|
mov eax, [ebp+16]
|
|
|
|
mov ecx, [ebp+8]
|
|
|
|
mov edx, [ebp+12]
|
2010-11-27 22:12:15 +00:00
|
|
|
int HEX(2D)
|
2007-03-03 04:39:25 +00:00
|
|
|
int 3
|
2007-01-24 19:48:34 +00:00
|
|
|
|
|
|
|
/* Restore stack */
|
|
|
|
pop ebp
|
|
|
|
ret 12
|
2011-10-13 15:16:29 +00:00
|
|
|
ENDFUNC
|
2007-01-24 19:48:34 +00:00
|
|
|
|
2011-10-13 15:16:29 +00:00
|
|
|
FUNC _DebugService@20
|
2011-09-05 22:18:56 +00:00
|
|
|
FPO 0, 5, 3, 0, 1, FRAME_NONFPO
|
2005-12-08 23:56:12 +00:00
|
|
|
|
|
|
|
/* Setup the stack */
|
|
|
|
push ebp
|
|
|
|
mov ebp, esp
|
2011-09-05 22:18:56 +00:00
|
|
|
|
2005-12-08 23:56:12 +00:00
|
|
|
/* Save the registers */
|
|
|
|
push ebx
|
|
|
|
push edi
|
2011-09-05 22:18:56 +00:00
|
|
|
|
2005-12-08 23:56:12 +00:00
|
|
|
/* Call the Interrupt */
|
|
|
|
mov eax, [ebp+8]
|
|
|
|
mov ecx, [ebp+12]
|
|
|
|
mov edx, [ebp+16]
|
|
|
|
mov ebx, [ebp+20]
|
|
|
|
mov edi, [ebp+24]
|
2010-11-27 22:12:15 +00:00
|
|
|
int HEX(2D)
|
2007-03-03 04:39:25 +00:00
|
|
|
int 3
|
2011-09-05 22:18:56 +00:00
|
|
|
|
2005-12-08 23:56:12 +00:00
|
|
|
/* Restore registers */
|
|
|
|
pop edi
|
|
|
|
pop ebx
|
2011-09-05 22:18:56 +00:00
|
|
|
|
2005-12-08 23:56:12 +00:00
|
|
|
/* Return */
|
2008-11-14 19:14:00 +00:00
|
|
|
pop ebp
|
2005-12-08 23:56:12 +00:00
|
|
|
ret 20
|
2011-10-13 15:16:29 +00:00
|
|
|
ENDFUNC
|
2010-11-27 22:12:15 +00:00
|
|
|
|
|
|
|
END
|