update for HEAD-2003091401
[reactos.git] / lib / ntdll / dbg / brkpoint.c
1 /* $Id$
2  *
3  * COPYRIGHT:       See COPYING in the top level directory
4  * PROJECT:         ReactOS kernel
5  * FILE:            lib/ntdll/dbg/brkpoint.c
6  * PURPOSE:         Handles breakpoints
7  * PROGRAMMER:      Eric Kohl
8  * UPDATE HISTORY:
9  *                  Created 28/12/1999
10  */
11
12 /* INCLUDES *****************************************************************/
13
14 #include <ddk/ntddk.h>
15 #include <debug.h>
16
17 /* FUNCTIONS *****************************************************************/
18
19 #if 0
20 /*
21  * FIXME: DbgBreakPoint must not have a stack frame, but GCC doesn't support
22  * __declspec(naked) yet
23  *
24  * @implemented
25  */
26 __declspec(naked) VOID STDCALL DbgBreakPoint(VOID)
27 { __asm__(ASM_BREAKPOINT_STR); }
28
29 /*
30  * @implemented
31  */
32 VOID STDCALL DbgUserBreakPoint(VOID)
33 { __asm__(ASM_BREAKPOINT_STR); }
34 #else
35 #define DBG_BP_FUNC(__NAME__) \
36 __asm__ \
37 ( \
38  "\n" \
39  ".global _" #__NAME__ "@0\n" \
40  "_" #__NAME__ "@0:\n" \
41  ASM_BREAKPOINT \
42  "ret $0\n" \
43 )
44
45 DBG_BP_FUNC(DbgBreakPoint);
46 DBG_BP_FUNC(DbgUserBreakPoint);
47 #endif
48
49 /* EOF */