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 | |
---|
11 | GDB is not currently RTEMS aware. The following configurations have been |
---|
12 | successfully 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 | |
---|
20 | Other configurations of gdb have successfully been used by RTEMS users |
---|
21 | but are not documented here. |
---|
22 | |
---|
23 | @section Unarchive the gdb Distribution |
---|
24 | |
---|
25 | Use the following commands to unarchive the gdb distribution: |
---|
26 | |
---|
27 | @example |
---|
28 | cd tools |
---|
29 | tar xzf ../archive/@value{GDB-TAR} |
---|
30 | @end example |
---|
31 | |
---|
32 | The 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 |
---|
41 | No RTEMS specific patches are required for @value{GDB-VERSION} to |
---|
42 | support @value{RTEMS-VERSION}. |
---|
43 | @end ifclear |
---|
44 | |
---|
45 | @ifset GDB-RTEMSPATCH |
---|
46 | |
---|
47 | Apply the patch using the following command sequence: |
---|
48 | |
---|
49 | @example |
---|
50 | cd tools/@value{GDB-UNTAR} |
---|
51 | zcat archive/@value{GDB-RTEMSPATCH} | patch -p1 |
---|
52 | @end example |
---|
53 | |
---|
54 | Check to see if any of these patches have been rejected using the following |
---|
55 | sequence: |
---|
56 | |
---|
57 | @example |
---|
58 | cd tools/@value{GDB-UNTAR} |
---|
59 | find . -name "*.rej" -print |
---|
60 | @end example |
---|
61 | |
---|
62 | If any files are found with the .rej extension, a patch has been rejected. |
---|
63 | This should not happen with a good patch file. |
---|
64 | |
---|
65 | To see the files that have been modified use the sequence: |
---|
66 | |
---|
67 | @example |
---|
68 | cd tools/@value{GDB-UNTAR} |
---|
69 | find . -name "*.orig" -print |
---|
70 | @end example |
---|
71 | |
---|
72 | The files that are found, have been modified by the patch file. |
---|
73 | |
---|
74 | @end ifset |
---|
75 | |
---|
76 | |
---|
77 | @section GDB with Sparc Instruction Simulation (SIS) |
---|
78 | |
---|
79 | @subheading Make the Build Directory |
---|
80 | |
---|
81 | Create a build directory for the SIS Debugger |
---|
82 | |
---|
83 | @example |
---|
84 | cd tools |
---|
85 | mkdir build-sis |
---|
86 | @end example |
---|
87 | |
---|
88 | @subheading Configure for the Build |
---|
89 | |
---|
90 | Configure the GNU Debugger for the |
---|
91 | Sparc Instruction Simulator (SIS): |
---|
92 | |
---|
93 | @example |
---|
94 | cd tools/build-sis |
---|
95 | ../@value{GDB-UNTAR}/configure --target-sparc-erc32-aout \ |
---|
96 | --program-prefix=sparc-rtems- \ |
---|
97 | --disable-gdbtk \ |
---|
98 | --enable-targets=all \ |
---|
99 | --prefix=<INSTALL_POINT_FOR_SIS> |
---|
100 | @end example |
---|
101 | |
---|
102 | Where <INSTALL_POINT_FOR_SIS> is a unique location where the gdb |
---|
103 | with SIS will be created. |
---|
104 | |
---|
105 | @subheading Make the Debugger |
---|
106 | |
---|
107 | From tools/build-sis execute the following command sequence: |
---|
108 | |
---|
109 | @example |
---|
110 | gmake all install |
---|
111 | @end example |
---|
112 | |
---|
113 | |
---|
114 | @section GDB with PowerPC Instruction Simulator |
---|
115 | |
---|
116 | @subheading Make the Build Directory |
---|
117 | |
---|
118 | Create a build directory for the SIS Debugger |
---|
119 | |
---|
120 | @example |
---|
121 | cd tools |
---|
122 | mkdir build-ppc |
---|
123 | @end example |
---|
124 | |
---|
125 | @subheading Configure for the Build |
---|
126 | |
---|
127 | Configure the GNU Debugger for the PowerPC |
---|
128 | Instruction Simulator (PSIM): |
---|
129 | |
---|
130 | @example |
---|
131 | cd tools/build-ppc |
---|
132 | ../@value{GDB-UNTAR}/configure \ |
---|
133 | --target=powerpc-unknown-eabi \ |
---|
134 | --program-prefix=powerpc-rtems- \ |
---|
135 | --enable-sim-powerpc \ |
---|
136 | --enable-sim-timebase \ |
---|
137 | --enable-sim-inline \ |
---|
138 | --enable-sim-hardware \ |
---|
139 | --enable-targets=all \ |
---|
140 | --prefix=<INSTALL_POINT_FOR_PPC> |
---|
141 | @end example |
---|
142 | |
---|
143 | Where <INSTALL_POINT_FOR_PPC> is a unique location where the gdb |
---|
144 | with PSIM will be created. |
---|
145 | |
---|
146 | |
---|
147 | @subheading Make the Debugger |
---|
148 | |
---|
149 | From tools/build-ppc execute the following command sequence: |
---|
150 | |
---|
151 | @example |
---|
152 | gmake all install |
---|
153 | @end example |
---|
154 | |
---|
155 | |
---|
156 | @section GDB for DINK32 |
---|
157 | |
---|
158 | @subheading Make the Build Directory |
---|
159 | |
---|
160 | Create a build directory for the DINK32 Debugger |
---|
161 | |
---|
162 | @example |
---|
163 | cd tools |
---|
164 | mkdir build-dink32 |
---|
165 | @end example |
---|
166 | |
---|
167 | @subheading Configure for the Build |
---|
168 | |
---|
169 | Configure the GNU Debugger to communicate with |
---|
170 | the DINK32 ROM monitor: |
---|
171 | |
---|
172 | @example |
---|
173 | cd tools/build-dink32 |
---|
174 | ../@value{GDB-UNTAR}/configure --target-powerpc-elf \ |
---|
175 | --program-prefix=powerpc-rtems- \ |
---|
176 | --enable-targets=all \ |
---|
177 | --prefix=<INSTALL_POINT_FOR_DINK32> |
---|
178 | @end example |
---|
179 | |
---|
180 | Where <INSTALL_POINT_FOR_DINK32> is a unique location where the |
---|
181 | gdb Dink32 will be created. |
---|
182 | |
---|
183 | @subheading Make the Debugger |
---|
184 | |
---|
185 | From tools/build-dink32 execute the following command sequence: |
---|
186 | |
---|
187 | @example |
---|
188 | gmake all install |
---|
189 | @end example |
---|
190 | |
---|