4.115
Last change
on this file since c499856 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /* gdb_glue |
---|
2 | * |
---|
3 | * Interface to initialize the GDB. |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-1998. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in the file LICENSE in this distribution or at |
---|
10 | * http://www.rtems.org/license/LICENSE. |
---|
11 | */ |
---|
12 | |
---|
13 | #include <bsp.h> |
---|
14 | #include <stdio.h> |
---|
15 | #include <uart.h> |
---|
16 | |
---|
17 | #define BREAKPOINT() __asm__ (" int $3"); |
---|
18 | |
---|
19 | extern int BSPConsolePort; |
---|
20 | void i386_stub_glue_init(int); |
---|
21 | void i386_stub_glue_init_breakin(void); |
---|
22 | void set_debug_traps(void); |
---|
23 | |
---|
24 | /* Init GDB glue */ |
---|
25 | void init_remote_gdb( void ) |
---|
26 | { |
---|
27 | if(BSPConsolePort != BSP_UART_COM2) |
---|
28 | { |
---|
29 | /* |
---|
30 | * If com2 is not used as console use it for |
---|
31 | * debugging |
---|
32 | */ |
---|
33 | |
---|
34 | i386_stub_glue_init(BSP_UART_COM2); |
---|
35 | printf( "Remote GDB using COM2...\n" ); |
---|
36 | |
---|
37 | } |
---|
38 | else |
---|
39 | { |
---|
40 | /* Otherwise use com1 */ |
---|
41 | i386_stub_glue_init(BSP_UART_COM1); |
---|
42 | printf( "Remote GDB using COM1...\n" ); |
---|
43 | } |
---|
44 | |
---|
45 | printf( "Remote GDB: setting traps...\n" ); |
---|
46 | /* Init GDB stub itself */ |
---|
47 | set_debug_traps(); |
---|
48 | |
---|
49 | printf( "Remote GDB: waiting remote connection....\n" ); |
---|
50 | |
---|
51 | /* |
---|
52 | * Init GDB break in capability, |
---|
53 | * has to be called after |
---|
54 | * set_debug_traps |
---|
55 | */ |
---|
56 | i386_stub_glue_init_breakin(); |
---|
57 | |
---|
58 | /* Put breakpoint in */ |
---|
59 | /* breakpoint(); */ |
---|
60 | /* BREAKPOINT(); */ |
---|
61 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.