6 # map host info into gdb names.
11 case "${host_vendor}" in
15 gas) gdb_host=altosgas ;;
22 amigados) gdb_host=amigados ;;
23 svr4) gdb_host=amix ;;
29 hpux) gdb_host=hp300hpux ;;
30 bsd) gdb_host=hp300bsd ;;
35 sony) gdb_host=news ;;
38 sunos3) gdb_host=sun3os3 ;;
39 sunos4) gdb_host=sun3os4 ;;
47 case "${host_vendor}" in
50 sunos3) gdb_host=sun2os3 ;;
51 sunos4) gdb_host=sun2os4 ;;
59 sunos3) gdb_host=sun4os3 ;;
60 sunos4) gdb_host=sun4os4 ;;
66 case "${host_vendor}" in
67 sony) gdb_host=news1000 ;;
72 case "${host_vendor}" in
73 sony) gdb_host=bigmips ;;
74 dec) gdb_host=decstation ;;
75 little) gdb_host=littlemips ;;
76 sgi) gdb_host=irix3 ;;
81 case "${host_vendor}" in
82 sun) gdb_host=sun386 ;;
83 sco) gdb_host=i386sco ;;
84 sequent) gdb_host=symmetry ;;
87 sysv) gdb_host=i386v ;;
88 sysv32) gdb_host=i386v32 ;;
89 mach) gdb_host=i386mach ;;
95 c1 | c2) gdb_host=convex ;;
98 case "${host_vendor}" in
99 umax) gdb_host=umax ;;
116 case "${host_vendor}" in
124 arm | vax | merlin | none | np1 | pn | pyramid | tahoe)
136 if [ ! -f xconfig/${gdb_host} ]; then
137 echo '***' "Gdb does not support host ${host}" 1>&2
141 # We really shouldn't depend on there being a space after XM_FILE= ...
142 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/${gdb_host}`
146 case "${target_cpu}" in
149 case "${target_vendor}" in
150 att) gdb_target=3b1 ;;
151 altos) gdb_target=altos ;;
154 amigados) gdb_host=amigados ;;
155 svr4) gdb_target=amix ;;
159 case "${target_os}" in
160 bsd) gdb_target=hp300bsd ;;
161 hpux) gdb_target=hp300hpux ;;
165 case "${target_os}" in
166 sunos3) gdb_target=sun3os3 ;;
167 sunos4) gdb_target=sun3os4 ;;
168 *) gdb_target=sun3 ;;
171 wrs) gdb_target=vxworks68 ;;
172 isi) gdb_target=isi ;;
173 sony) gdb_target=news ;;
178 case "${target_vendor}" in
180 case "${target_os}" in
181 sunos3) gdb_target=sun2os3 ;;
182 sunos4) gdb_target=sun2os4 ;;
183 *) gdb_target=sun2 ;;
189 case "${target_vendor}" in
190 sony) gdb_target=news1000 ;;
194 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
195 gdb_target=${target_cpu} ;;
198 case "${target_vendor}" in
199 motorola) gdb_target=delta88 ;;
200 *) gdb_target=dgux ;;
204 case "${target_os}" in
205 none|aout|coff) gdb_target=a29k ;;
206 sym1) gdb_target=ultra3 ;;
207 kern) gdb_target=a29k-kern ;;
208 ebmon) gdb_target=a29k;;
213 case "${target_vendor}" in
214 sony) gdb_target=bigmips ;;
215 dec) gdb_target=decstation ;;
216 little) gdb_target=littlemips ;;
217 sgi) gdb_target=irix3 ;;
221 c1 | c2) gdb_target=convex ;;
224 case "${target_vendor}" in
226 case "${target_os}" in
227 sunos3) gdb_target=sun4os3 ;;
228 sunos4) gdb_target=sun4os4 ;;
229 *) gdb_target=sun4 ;;
237 case "${target_vendor}" in
238 sco) gdb_target=i386sco ;;
239 sun) gdb_target=sun386 ;;
240 sequent) gdb_target=symmetry ;;
241 coff) gdb_target=i386v ;;
242 aout) gdb_target=i386aout ;;
244 case "${target_os}" in
245 sysv) gdb_target=i386v ;;
246 sysv32) gdb_target=i386v32 ;;
247 mach) gdb_target=i386mach ;;
253 case "${target_vendor}" in
254 bout | wrs) gdb_target=vxworks960 ;;
255 coff | intel) gdb_target=nindy960 ;;
260 case "${target_vendor}" in
261 utek) gdb_target=umax ;;
269 ### unhandled targets
276 if [ ! -f tconfig/${gdb_target} ]; then
277 echo '***' "Gdb does not support target ${target}" 1>&2
281 if [ -z "${removing}" ] ; then
282 cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
286 # We really shouldn't depend on there being a space after TM_FILE= ...
287 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
289 host_makefile_frag=xconfig/${gdb_host}
290 target_makefile_frag=tconfig/${gdb_target}
292 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
293 # ?config/* file, we don't make the corresponding links. But we have
294 # to remove the xm.h files and tm.h files anyway, e.g. when switching
295 # from "configure host" to "configure none".
299 if [ "${hostfile}" != "" ]; then
300 files="${files} ${hostfile}"
301 links="${links} xm.h"
304 if [ "${targetfile}" != "" ]; then
305 files="${files} ${targetfile}"
306 links="${links} tm.h"
315 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
316 echo "source ${srcdir}/.gdbinit" >> .gdbinit
319 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile