03793f1e28da5a80d8b894e4160085c3476010b4
[akaros.git] / tests / breakpoint.c
1 // program to cause a breakpoint trap
2
3 // TODO: have arch specific user includes
4 #ifdef __i386__
5 static __inline void
6 breakpoint(void)
7 {
8         __asm __volatile("int3");
9 }
10 #else
11 static __inline void
12 breakpoint(void)
13 {
14         asm volatile ("ta 0x7f");
15 }
16 #endif
17
18 int main(int argc, char** argv)
19 {
20         breakpoint();
21         return 0;
22 }
23