source: rtems/c/src/lib/libbsp/i386/shared/comm/GDB.HOWTO @ 95501284

Last change on this file since 95501284 was 95501284, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 18, 2003 at 2:25:40 PM

2003-03-18 Joel Sherrill <joel@…>

  • comm/GDB.HOWTO: Updated.
  • Property mode set to 100644
File size: 3.1 KB
Line 
11. Add GDB initilization to your target's code:
2
3a) include file:
4
5#include <uart.h>
6
7b) declare this variable:   
8
9extern int BSPConsolePort;
10
11c) To start-up GDB, run this:
12
13 /* Init GDB glue  */
14
15  if(BSPConsolePort != BSP_UART_COM2)
16    {
17      /*
18       * If com2 is not used as console use it for
19       * debugging
20       */
21      i386_stub_glue_init(BSP_UART_COM2);
22    }
23  else
24    {
25      /* Otherwise use com1 */
26      i386_stub_glue_init(BSP_UART_COM1);
27    }
28
29  /* Init GDB stub itself */
30  set_debug_traps();
31
32  /*
33   * Init GDB break in capability,
34   * has to be called after
35   * set_debug_traps
36   */
37  i386_stub_glue_init_breakin();
38
39  /* Put breakpoint in */
40  breakpoint();
41
42d) This is all you need to do for the target.
43
442. Edit cmds: specify path to current directory and device used for debugging
45   example of cmds is attached below.  Make sure your paths are correct.
463. type 'make'
474. Boot o-pc386/<test>.exe on target computer, where <test> has the code from step 1. ( I modified and recompiled base_sp as the <test> )
485. run 'i396-rtems-gdb --nx --command=./cmds o-pc386/<test>.coff
49
50=========================== example cmds ==============================
51/usr1/rtems/work/rtems/cpukit/ada
52/usr1/rtems/work/rtems/cpukit/itron/inline/rtems/itron
53/usr1/rtems/work/rtems/cpukit/itron/src
54/usr1/rtems/work/rtems/cpukit/libblock/src
55/usr1/rtems/work/rtems/cpukit/libcsupport/src
56/usr1/rtems/work/rtems/cpukit/libfs/src/dosfs
57/usr1/rtems/work/rtems/cpukit/libfs/src/imfs
58/usr1/rtems/work/rtems/cpukit/libmisc/capture
59/usr1/rtems/work/rtems/cpukit/libmisc/cpuuse
60/usr1/rtems/work/rtems/cpukit/libmisc/devnull
61/usr1/rtems/work/rtems/cpukit/libmisc/dummy
62/usr1/rtems/work/rtems/cpukit/libmisc/dumpbuf
63/usr1/rtems/work/rtems/cpukit/libmisc/monitor
64/usr1/rtems/work/rtems/cpukit/libmisc/mw-fb
65/usr1/rtems/work/rtems/cpukit/libmisc/rtmonuse
66/usr1/rtems/work/rtems/cpukit/libmisc/serdbg
67/usr1/rtems/work/rtems/cpukit/libmisc/shell
68/usr1/rtems/work/rtems/cpukit/libmisc/stackchk
69/usr1/rtems/work/rtems/cpukit/libmisc/untar
70/usr1/rtems/work/rtems/cpukit/libnetworking/arpa
71/usr1/rtems/work/rtems/cpukit/libnetworking/kern
72/usr1/rtems/work/rtems/cpukit/libnetworking/lib
73/usr1/rtems/work/rtems/cpukit/libnetworking/libc
74/usr1/rtems/work/rtems/cpukit/libnetworking/machine
75/usr1/rtems/work/rtems/cpukit/libnetworking/net
76/usr1/rtems/work/rtems/cpukit/libnetworking/netinet
77/usr1/rtems/work/rtems/cpukit/libnetworking/nfs
78/usr1/rtems/work/rtems/cpukit/libnetworking/rtems
79/usr1/rtems/work/rtems/cpukit/libnetworking/sys
80/usr1/rtems/work/rtems/cpukit/libnetworking/vm
81/usr1/rtems/work/rtems/cpukit/librpc/src/rpc
82/usr1/rtems/work/rtems/cpukit/librpc/src/xdr
83/usr1/rtems/work/rtems/cpukit/posix/src
84/usr1/rtems/work/rtems/cpukit/posix/inline/rtems/posix
85/usr1/rtems/work/rtems/cpukit/rtems/inline/rtems/rtems
86/usr1/rtems/work/rtems/cpukit/rtems/src
87/usr1/rtems/work/rtems/cpukit/sapi/inline/rtems
88/usr1/rtems/work/rtems/cpukit/sapi/src
89/usr1/rtems/work/rtems/cpukit/score/cpu/i386
90/usr1/rtems/work/rtems/cpukit/score/cpu/i386/rtems/score
91/usr1/rtems/work/rtems/cpukit/score/src
92/usr1/rtems/work/rtems/cpukit/score/inline/rtems/score
93set remotebaud 38400
94target remote /dev/ttyS1
Note: See TracBrowser for help on using the repository browser.