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

4.104.114.84.95
Last change on this file since e8e2cf13 was e8e2cf13, checked in by Joel Sherrill <joel.sherrill@…>, on 10/20/98 at 12:30:59

Added information about the bit_gdb script.

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