update for HEAD-2003050101
[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 __declspec(naked) VOID STDCALL DbgBreakPoint(VOID)
25 { __asm__(ASM_BREAKPOINT_STR); }
26
27 VOID STDCALL DbgUserBreakPoint(VOID)
28 { __asm__(ASM_BREAKPOINT_STR); }
29 #else
30 #define DBG_BP_FUNC(__NAME__) \
31 __asm__ \
32 ( \
33  "\n" \
34  ".global _" #__NAME__ "@0\n" \
35  "_" #__NAME__ "@0:\n" \
36  ASM_BREAKPOINT \
37  "ret $0\n" \
38 )
39
40 DBG_BP_FUNC(DbgBreakPoint);
41 DBG_BP_FUNC(DbgUserBreakPoint);
42 #endif
43
44 /* EOF */