5 # map host info into gdb names.
10 case "${host_vendor}" in
14 gas) gdb_host=altosgas ;;
21 amigados) gdb_host=amigados ;;
22 svr4) gdb_host=amix ;;
28 hpux) gdb_host=hp300hpux ;;
29 bsd) gdb_host=hp300bsd ;;
34 sony) gdb_host=news ;;
37 sunos3) gdb_host=sun3os3 ;;
38 sunos4) gdb_host=sun3os4 ;;
46 case "${host_vendor}" in
49 sunos3) gdb_host=sun2os3 ;;
50 sunos4) gdb_host=sun2os4 ;;
58 sunos3) gdb_host=sun4os3 ;;
59 sunos4) gdb_host=sun4os4 ;;
65 case "${host_vendor}" in
66 sony) gdb_host=news1000 ;;
71 case "${host_vendor}" in
72 sony) gdb_host=bigmips ;;
73 dec) gdb_host=decstation ;;
74 little) gdb_host=littlemips ;;
75 sgi) gdb_host=irix3 ;;
80 case "${host_vendor}" in
81 sun) gdb_host=sun386 ;;
82 sco) gdb_host=i386sco ;;
83 sequent) gdb_host=symmetry ;;
86 sysv) gdb_host=i386v ;;
87 sysv32) gdb_host=i386v32 ;;
88 mach) gdb_host=i386mach ;;
94 c1 | c2) gdb_host=convex ;;
97 case "${host_vendor}" in
98 umax) gdb_host=umax ;;
115 case "${host_vendor}" in
123 arm | vax | merlin | none | np1 | pn | pyramid | tahoe)
135 if [ ! -f xconfig/${gdb_host} ]; then
136 echo '***' "Gdb does not support host ${host}" 1>&2
140 # We really shouldn't depend on there being a space after XM_FILE= ...
141 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/${gdb_host}`
145 case "${target_cpu}" in
148 case "${target_vendor}" in
149 att) gdb_target=3b1 ;;
150 altos) gdb_target=altos ;;
153 amigados) gdb_host=amigados ;;
154 svr4) gdb_target=amix ;;
158 case "${target_os}" in
159 bsd) gdb_target=hp300bsd ;;
160 hpux) gdb_target=hp300hpux ;;
164 case "${target_os}" in
165 sunos3) gdb_target=sun3os3 ;;
166 sunos4) gdb_target=sun3os4 ;;
167 *) gdb_target=sun3 ;;
170 wrs) gdb_target=vxworks68 ;;
171 isi) gdb_target=isi ;;
172 sony) gdb_target=news ;;
177 case "${target_vendor}" in
179 case "${target_os}" in
180 sunos3) gdb_target=sun2os3 ;;
181 sunos4) gdb_target=sun2os4 ;;
182 *) gdb_target=sun2 ;;
188 case "${target_vendor}" in
189 sony) gdb_target=news1000 ;;
193 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
194 gdb_target=${target_cpu} ;;
197 case "${target_vendor}" in
198 motorola) gdb_target=delta88 ;;
199 *) gdb_target=dgux ;;
203 case "${target_os}" in
204 none|aout|coff) gdb_target=a29k ;;
205 sym1) gdb_target=ultra3 ;;
206 kern) gdb_target=a29k-kern ;;
207 ebmon) gdb_target=a29k;;
212 case "${target_vendor}" in
213 sony) gdb_target=bigmips ;;
214 dec) gdb_target=decstation ;;
215 little) gdb_target=littlemips ;;
216 sgi) gdb_target=irix3 ;;
220 c1 | c2) gdb_target=convex ;;
223 case "${target_vendor}" in
225 case "${target_os}" in
226 sunos3) gdb_target=sun4os3 ;;
227 sunos4) gdb_target=sun4os4 ;;
228 *) gdb_target=sun4 ;;
236 case "${target_vendor}" in
237 sco) gdb_target=i386sco ;;
238 sun) gdb_target=sun386 ;;
239 sequent) gdb_target=symmetry ;;
240 coff) gdb_target=i386v ;;
241 aout) gdb_target=i386aout ;;
243 case "${target_os}" in
244 sysv) gdb_target=i386v ;;
245 sysv32) gdb_target=i386v32 ;;
246 mach) gdb_target=i386mach ;;
252 case "${target_vendor}" in
253 bout | wrs) gdb_target=vxworks960 ;;
254 coff | intel) gdb_target=nindy960 ;;
259 case "${target_vendor}" in
260 utek) gdb_target=umax ;;
268 ### unhandled targets
275 if [ ! -f tconfig/${gdb_target} ]; then
276 echo '***' "Gdb does not support target ${target}" 1>&2
280 if [ -z "${removing}" ] ; then
281 cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
285 # We really shouldn't depend on there being a space after TM_FILE= ...
286 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
288 host_makefile_frag=xconfig/${gdb_host}
289 target_makefile_frag=tconfig/${gdb_target}
291 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
292 # ?config/* file, we don't make the corresponding links. But we have
293 # to remove the xm.h files and tm.h files anyway, e.g. when switching
294 # from "configure host" to "configure none".
298 if [ "${hostfile}" != "" ]; then
299 files="${files} ${hostfile}"
300 links="${links} xm.h"
303 if [ "${targetfile}" != "" ]; then
304 files="${files} ${targetfile}"
305 links="${links} tm.h"
314 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
315 echo "source ${srcdir}/.gdbinit" >> .gdbinit
318 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile