4.104.114.84.95
Last change
on this file since a4d3eb0d was
a4d3eb0d,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/04/05 at 23:28:37
|
2005-01-04 Joel Sherrill <joel@…>
- comm/gdb_glue.c, irq/idt.c: Remove warnings.
|
-
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.com/license/LICENSE. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #include <bsp.h> |
---|
16 | #include <stdio.h> |
---|
17 | #include <uart.h> |
---|
18 | |
---|
19 | #define BREAKPOINT() asm(" int $3"); |
---|
20 | |
---|
21 | extern int BSPConsolePort; |
---|
22 | void i386_stub_glue_init(int); |
---|
23 | void i386_stub_glue_init_breakin(void); |
---|
24 | void set_debug_traps(void); |
---|
25 | |
---|
26 | /* Init GDB glue */ |
---|
27 | void init_remote_gdb( void ) |
---|
28 | { |
---|
29 | if(BSPConsolePort != BSP_UART_COM2) |
---|
30 | { |
---|
31 | /* |
---|
32 | * If com2 is not used as console use it for |
---|
33 | * debugging |
---|
34 | */ |
---|
35 | |
---|
36 | i386_stub_glue_init(BSP_UART_COM2); |
---|
37 | printf( "Remote GDB using COM2...\n" ); |
---|
38 | |
---|
39 | } |
---|
40 | else |
---|
41 | { |
---|
42 | /* Otherwise use com1 */ |
---|
43 | i386_stub_glue_init(BSP_UART_COM1); |
---|
44 | printf( "Remote GDB using COM1...\n" ); |
---|
45 | } |
---|
46 | |
---|
47 | printf( "Remote GDB: setting traps...\n" ); |
---|
48 | /* Init GDB stub itself */ |
---|
49 | set_debug_traps(); |
---|
50 | |
---|
51 | printf( "Remote GDB: waiting remote connection....\n" ); |
---|
52 | |
---|
53 | /* |
---|
54 | * Init GDB break in capability, |
---|
55 | * has to be called after |
---|
56 | * set_debug_traps |
---|
57 | */ |
---|
58 | i386_stub_glue_init_breakin(); |
---|
59 | |
---|
60 | /* Put breakpoint in */ |
---|
61 | /* breakpoint(); */ |
---|
62 | /* BREAKPOINT(); */ |
---|
63 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.