source: rtems/bsps/i386/pc386/console/gdb_glue.c @ 7a8e71b

5
Last change on this file since 7a8e71b was 7a8e71b, checked in by Sebastian Huber <sebastian.huber@…>, on 04/24/18 at 05:36:46

bsps/i386: Move shared files to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • 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
19extern int BSPConsolePort;
20void i386_stub_glue_init(int);
21void i386_stub_glue_init_breakin(void);
22void set_debug_traps(void);
23
24 /* Init GDB glue  */
25void 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.