summaryrefslogtreecommitdiff
path: root/pc386-gdb.c
blob: dc0b462261ccbbc9fa8733c979f0c28cd4b3e2ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * RTEMS Project (http://www.rtems.org/)
 *
 * Copyright 2007-2012 Chris Johns (chrisj@rtems.org)
 */

/**
 * PC386 GDB support.
 */

#include <stdio.h>

#include <bsp.h>
#include <uart.h>

void
pc386_gdb_init (void)
{
  printf ("GDB Initialisation\n");

  i386_stub_glue_init (BSP_UART_COM2);

  /*
   * Init GDB stub itself
   */
  set_debug_traps();

  /*
   * Init GDB break in capability, has to be called after set_debug_traps
   */
  i386_stub_glue_init_breakin();

  /*
   * Put breakpoint in and stop and wait for GDB.
   */
  breakpoint();
}