source: rtems/doc/started/gdb.t @ bb4b574

4.104.114.84.95
Last change on this file since bb4b574 was bb4b574, checked in by Joel Sherrill <joel.sherrill@…>, on 04/25/00 at 13:15:14

Merged changes from 4.5 branch and removed that branch.

  • Property mode set to 100644
File size: 4.6 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-1999.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@chapter Building the GNU Debugger
10
11GDB is currently RTEMS aware only if you are using the remote debugging
12support via Ethernet.   The following configurations have been
13successfully used with RTEMS applications:
14
15@itemize @bullet
16@item Sparc Instruction Simulator (SIS)
17@item PowerPC Instruction Simulator (PSIM)
18@item DINK32
19@end itemize
20
21Other configurations of gdb have successfully been used by RTEMS users
22but are not documented here.
23
24It is recommended that when toolset binaries are available for
25your particular host, that they be used.  Prebuilt binaries
26are much easier to install.
27
28@section Unarchive the gdb Distribution
29
30Use the following commands to unarchive the gdb distribution:
31
32@example
33cd tools
34tar xzf ../archive/@value{GDB-TAR}
35@end example
36
37The directory @value{GDB-UNTAR} is created under the tools directory.
38
39@c
40@c  GDB Patch
41@c
42
43@section Apply RTEMS Patch to GDB
44
45@ifclear GDB-RTEMSPATCH
46No RTEMS specific patches are required for @value{GDB-VERSION} to
47support @value{RTEMS-VERSION}.
48@end ifclear
49
50@ifset GDB-RTEMSPATCH
51
52Apply the patch using the following command sequence:
53
54@example
55cd tools/@value{GDB-UNTAR}
56zcat archive/@value{GDB-RTEMSPATCH} | patch -p1
57@end example
58
59Check to see if any of these patches have been rejected using the following
60sequence:
61
62@example
63cd tools/@value{GDB-UNTAR}
64find . -name "*.rej" -print
65@end example
66
67If any files are found with the .rej extension, a patch has been rejected.
68This should not happen with a good patch file.
69
70@end ifset
71
72@section Using the bit_gdb script
73
74The simplest way to build gdb for RTEMS is to use the @code{bit_gdb} script.
75This script interprets the settings in the @code{user.cfg} file to
76produce the gdb configuration most appropriate for the target CPU.
77
78This script is invoked as follows:
79
80@example
81./bit_gdb CPU
82@end example
83
84Where CPU is one of the RTEMS supported CPU families from the following
85list:
86
87@itemize @bullet
88@item hppa1.1
89@item i386
90@item i386-elf
91@item i386-go32
92@item i960
93@item m68k
94@item mips64orion
95@item powerpc
96@item sh
97@item sparc
98@end itemize
99
100If gdb supports a CPU instruction simulator for this configuration, then
101it is included in the build.
102
103@section Using the gdb configure Script Directly
104
105@subsection GDB with Sparc Instruction Simulation (SIS)
106
107@subheading Make the Build Directory
108
109Create a build directory for the SIS Debugger
110
111@example
112cd tools
113mkdir build-sis
114@end example
115
116@subheading Configure for the Build
117
118Configure the GNU Debugger for the
119Sparc Instruction Simulator (SIS):
120
121@example
122cd tools/build-sis
123../@value{GDB-UNTAR}/configure --target-sparc-erc32-aout \
124    --program-prefix=sparc-rtems- \
125    --disable-gdbtk \
126    --enable-targets=all \
127    --prefix=<INSTALL_POINT_FOR_SIS>
128@end example
129
130Where <INSTALL_POINT_FOR_SIS> is a unique location where the gdb
131with SIS will be created.
132
133@subheading Make the Debugger
134
135From tools/build-sis execute the following command sequence:
136
137@example
138gmake all install
139@end example
140
141
142@subsection GDB with PowerPC Instruction Simulator
143
144@subheading Make the Build Directory
145
146Create a build directory for the SIS Debugger
147
148@example
149cd tools
150mkdir build-ppc
151@end example
152
153@subheading Configure for the Build
154
155Configure the GNU Debugger for the PowerPC
156Instruction Simulator (PSIM):
157
158@example
159cd tools/build-ppc
160../@value{GDB-UNTAR}/configure \
161      --target=powerpc-unknown-eabi \
162      --program-prefix=powerpc-rtems- \
163      --enable-sim-powerpc \
164      --enable-sim-timebase \
165      --enable-sim-inline \
166      --enable-sim-hardware \
167      --enable-targets=all \
168      --prefix=<INSTALL_POINT_FOR_PPC>
169@end example
170
171Where <INSTALL_POINT_FOR_PPC> is a unique location where the gdb
172with PSIM will be created.
173
174
175@subheading Make the Debugger
176
177From tools/build-ppc execute the following command sequence:
178
179@example
180gmake all install
181@end example
182
183
184@subsection GDB for DINK32
185
186@subheading Make the Build Directory
187
188Create a build directory for the DINK32 Debugger
189
190@example
191cd tools
192mkdir build-dink32
193@end example
194
195@subheading Configure for the Build
196
197Configure the GNU Debugger to communicate with
198the DINK32 ROM monitor:
199
200@example
201cd tools/build-dink32
202../@value{GDB-UNTAR}/configure --target-powerpc-elf \
203    --program-prefix=powerpc-rtems- \
204    --enable-targets=all \
205    --prefix=<INSTALL_POINT_FOR_DINK32>
206@end example
207
208Where <INSTALL_POINT_FOR_DINK32> is a unique location where the
209gdb Dink32 will be created.
210
211@subheading Make the Debugger
212
213From tools/build-dink32 execute the following command sequence:
214
215@example
216gmake all install
217@end example
218
Note: See TracBrowser for help on using the repository browser.