source: rtems/c/src/lib/libbsp/i386/shared/comm/gdb_glue.c @ 3299388d

4.104.114.84.95
Last change on this file since 3299388d was a3c7123, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:51:24

2003-09-04 Joel Sherrill <joel@…>

  • comm/gdb_glue.c, irq/idt.c, irq/irq.c, irq/irq.h, irq/irq_asm.S, irq/irq_asm.h, irq/irq_init.c: URL for license changed.
  • Property mode set to 100644
File size: 1.2 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
21extern int BSPConsolePort;
22
23 /* Init GDB glue  */
24void init_remote_gdb( void )
25{
26  if(BSPConsolePort != BSP_UART_COM2)
27    {
28      /*
29       * If com2 is not used as console use it for
30       * debugging
31       */
32
33      i386_stub_glue_init(BSP_UART_COM2);
34      printf( "Remote GDB using COM2...\n" );
35
36    }
37  else
38    {
39      /* Otherwise use com1 */
40      i386_stub_glue_init(BSP_UART_COM1);
41      printf( "Remote GDB using COM1...\n" );
42    }
43
44  printf( "Remote GDB: setting traps...\n" );
45  /* Init GDB stub itself */
46  set_debug_traps();
47
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}
62
Note: See TracBrowser for help on using the repository browser.