source: rtems/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/serial_gdb.c @ 45805cc

4.104.114.84.95
Last change on this file since 45805cc was 45805cc, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 6, 2002 at 8:06:53 PM

2002-01-03 Ralf Corsepius <corsepiu@…>

  • include/bsp.h: Include rtems/bspIo.h instead of bspIo.h.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*  serial_gdb
2 *
3 *  Interface to initialize the GDB.
4 *
5 *  COPYRIGHT (c) 1989-1999.
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.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14
15#include <uart.h>
16#include <rtems/bspIo.h>
17
18extern int BSPConsolePort;
19
20void i386_stub_glue_init(int);
21void i386_stub_glue_init_breakin(void);
22void set_debug_traps(void);
23
24
25 /* Init GDB glue  */
26
27void init_serial_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      printk( "Remote GDB using COM2...\n" );
38
39    }
40  else
41    {
42      /* Otherwise use com1 */
43      i386_stub_glue_init(BSP_UART_COM1);
44      printk( "Remote GDB using COM1...\n" );
45    }
46
47  printk( "Remote GDB: setting traps...\n" );
48  /* Init GDB stub itself */
49  set_debug_traps();
50
51
52  printk( "Remote GDB: waiting for remote connection...\n" );
53
54  /*
55   * Init GDB break in capability,
56   * has to be called after
57   * set_debug_traps
58   */
59  i386_stub_glue_init_breakin();
60
61}
Note: See TracBrowser for help on using the repository browser.