/testbed/pc386-gdb.c

http://rtems-atapi.googlecode.com/ · C · 39 lines · 12 code · 8 blank · 19 comment · 0 complexity · c8a8dd47e68d1fad187aac117e09effd MD5 · raw file

  1. /*
  2. * $Id$
  3. *
  4. * RTEMS Project (http://www.rtems.org/)
  5. *
  6. * Copyright 2007 Chris Johns (chrisj@rtems.org)
  7. */
  8. /**
  9. * PC386 GDB support.
  10. */
  11. #include <stdio.h>
  12. #include <bsp.h>
  13. #include <uart.h>
  14. void
  15. pc386_gdb_init ()
  16. {
  17. printf ("GDB Initialisation\n");
  18. i386_stub_glue_init (BSP_UART_COM1);
  19. /*
  20. * Init GDB stub itself
  21. */
  22. set_debug_traps();
  23. /*
  24. * Init GDB break in capability, has to be called after set_debug_traps
  25. */
  26. i386_stub_glue_init_breakin();
  27. /*
  28. * Put breakpoint in and stop and wait for GDB.
  29. */
  30. breakpoint();
  31. }