OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [i386/] [shared/] [comm/] [gdb_glue.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  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.OARcorp.com/rtems/license.html.
11
 *
12
 *  gdb_glue.c,v 1.2 2001/10/12 21:09:04 joel Exp
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
 
23
 /* Init GDB glue  */
24
void 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
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.