POK(kernelpart)
debug.c
Go to the documentation of this file.
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Thu Jan 15 23:34:13 2009
15  */
16 
17 
18 #ifdef POK_NEEDS_DEBUG
19 
20 #include <libc.h>
21 #include "../event.h"
22 
23 void set_debug_traps (); /* provided by the gdb stub*/
24 
25 void putDebugChar ()
26 {
27 }
28 
29 int getDebugChar ()
30 {
31  return 0;
32 }
33 
34 void exceptionHandler (int exception_number,
35  void* exception_address)
36 {
37  pok_idt_set_gate (exception_number,
39  (uint32_t)exception_address,
41  3);
42 }
43 
44 void set_debug_serial_port ()
45 {
46 }
47 
48 void pok_bsp_debug ()
49 {
50  set_debug_serial_port ();
51  set_debug_traps ();
52  printf ("Waiting GDB connection\n");
53  __asm__ ("int3");
54 }
55 
56 #endif