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

4.104.114.84.9
Last change on this file since 0ebbf66 was 0ebbf66, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 5, 1998 at 10:36:06 PM

Large patch from Erik Ivanenko <erik.ivanenko@…> which
moves pieces of the pc386 bsp up to a shared level for all i386 BSPs
and modifies the i386ex BSP to use those shared pieces. Serial remote
debugging is included for both targets. Erik's notes:

There are several workarounds in it:

1) #define NEXT_GAS is hardcoded in pc386/start/start.s
2) #define NEXT_GAS is hardcoded in i386ex/start/start.s
3) #define NEW_GAS is hardcoded in pc386/start16.s
4) #undef assert and redeclare _assert hardcoded in console.c for

both pc386 and i386ex due to my egcs1.1b ~ newlib problem. Should have
modified t-rtems.cfg ( no time )

I've tested pc386 with both video and serial consoles and GDB remote.
All work fine, except that GDB acts weird. ( re: other posting)

I hope this will work for you. It took quite some time to locate the
autoconf error. The remainder was just grunt work.
Unfortunately, I think I've unwound the removal of the IBMPCInitVideo
stuff. Sorry. I REALLY can't spend more time... I've been at this
conversion to 4.0 locally and updating the release since Sept. 8th, and
have yet to compile my network driver.... This is as much as I can do
right now.

I look forward to the next patch to really test i368ex. I did make sure
that the sample tests worked for pc386.

  • Property mode set to 100644
File size: 9.6 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 ==============================
51dir /home/cross-19980908/tools/rtems-980923
52dir /home/cross-19980908/tools/rtems-980923/aclocal
53dir /home/cross-19980908/tools/rtems-980923/c
54dir /home/cross-19980908/tools/rtems-980923/c/build-tools
55dir /home/cross-19980908/tools/rtems-980923/c/build-tools/os
56dir /home/cross-19980908/tools/rtems-980923/c/build-tools/os/msdos
57dir /home/cross-19980908/tools/rtems-980923/c/build-tools/scripts
58dir /home/cross-19980908/tools/rtems-980923/c/build-tools/src
59dir /home/cross-19980908/tools/rtems-980923/c/src
60dir /home/cross-19980908/tools/rtems-980923/c/src/exec
61dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix
62dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/base
63dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/headers
64dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/inline
65dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/macros
66dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/optman
67dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/src
68dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/sys
69dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi
70dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/headers
71dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/src
72dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/inline
73dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/macros
74dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/optman
75dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems
76dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/headers
77dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/src
78dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/inline
79dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/macros
80dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/optman
81dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score
82dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu
83dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/a29k
84dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/hppa1.1
85dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/i386
86dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/i960
87dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/m68k
88dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/mips64orion
89dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/no_cpu
90dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/powerpc
91dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/sh
92dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/sparc
93dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/unix
94dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/headers
95dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/inline
96dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/macros
97dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/src
98dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/tools
99dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/tools/generic
100dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/tools/unix
101dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/tools/hppa1.1
102dir /home/cross-19980908/tools/rtems-980923/c/src/exec/wrapup
103dir /home/cross-19980908/tools/rtems-980923/c/src/exec/wrapup/posix
104dir /home/cross-19980908/tools/rtems-980923/c/src/exec/wrapup/rtems
105dir /home/cross-19980908/tools/rtems-980923/c/src/lib
106dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include
107dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include/motorola
108dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include/rtems++
109dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include/sys
110dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include/zilog
111dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libc
112dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp
113dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386
114dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386
115dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/clock
116dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/console
117dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/include
118dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/start
119dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/startup
120dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/timer
121dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/tools
122dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/wrapup
123dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/shared/comm
124dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/shared/pci
125dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu
126dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1
127dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/clock
128dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/include
129dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/milli
130dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/runway
131dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/semaphore
132dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/timer
133dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/m68k
134dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/m68k/m68040
135dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/m68k/m68040/fpsp
136dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/mips64orion
137dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/mips64orion/clock
138dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/mips64orion/include
139dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/mips64orion/timer
140dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc
141dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403
142dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/clock
143dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/console
144dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/include
145dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/timer
146dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/vectors
147dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh
148dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032
149dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/clock
150dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/null
151dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/console
152dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/include
153dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/timer
154dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sparc
155dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sparc/reg_win
156dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libnetworking
157dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc
158dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/assoc
159dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/cpuuse
160dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/error
161dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/monitor
162dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/rtmonuse
163dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/stackchk
164dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/wrapup
165dir /home/cross-19980908/tools/rtems-980923/c/src/lib/librtems++
166dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start
167dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/a29k
168dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/i960
169dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/m68k
170dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/mips64orion
171dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/sh
172dir /home/cross-19980908/tools/rtems-980923/c/src/lib/wrapup
173dir /home/cross-19980908/tools/rtems-980923/c/src/tests
174dir /home/cross-19980908/tools/rtems-980923/c/src/tests/samples
175dir /home/cross-19980908/tools/rtems-980923/c/src/tests/samples/base_sp
176set remotebaud 38400
177target remote /dev/ttyS1
Note: See TracBrowser for help on using the repository browser.