6 # map host info into gdb names.
11 case "${host_vendor}" in
15 gas) gdb_host=altosgas ;;
21 hpux) gdb_host=hp300hpux ;;
22 bsd) gdb_host=hp300bsd ;;
27 sony) gdb_host=news ;;
30 sunos3) gdb_host=sun3os3 ;;
31 sunos4) gdb_host=sun3os4 ;;
39 case "${host_vendor}" in
42 sunos3) gdb_host=sun2os3 ;;
43 sunos4) gdb_host=sun2os4 ;;
51 sunos3) gdb_host=sun4os3 ;;
52 sunos4) gdb_host=sun4os4 ;;
58 case "${host_vendor}" in
59 sony) gdb_host=news1000 ;;
64 case "${host_vendor}" in
65 sony) gdb_host=bigmips ;;
66 dec) gdb_host=dec3100 ;;
67 little) gdb_host=littlemips ;;
72 case "${host_vendor}" in
73 sun) gdb_host=sun386 ;;
74 sco) gdb_host=i386sco ;;
75 sequent) gdb_host=symmetry ;;
78 sysv) gdb_host=i386v ;;
79 sysv32) gdb_host=i386v32 ;;
85 c1 | c2) gdb_host=convex ;;
88 case "${host_vendor}" in
89 umax) gdb_host=umax ;;
93 arm | vax | m88k | merlin | none | np1 | pn | pyramid | tahoe) gdb_host=${host_cpu} ;;
102 if [ ! -f xconfig/${gdb_host} ]; then
103 echo '***' "Gdb does not support host ${host}" 1>&2
107 # We really shouldn't depend on there being a space after XM_FILE= ...
108 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/${gdb_host}`
112 case "${target_cpu}" in
115 case "${target_vendor}" in
116 att) gdb_target=3b1 ;;
117 altos) gdb_target=altos ;;
119 case "${target_os}" in
120 bsd) gdb_target=hp300bsd ;;
121 hpux) gdb_target=hp300hpux ;;
125 case "${target_os}" in
126 sunos3) gdb_target=sun3os3 ;;
127 sunos4) gdb_target=sun3os4 ;;
128 *) gdb_target=sun3 ;;
131 wrs) gdb_target=vxworks68 ;;
132 isi) gdb_target=isi ;;
133 sony) gdb_target=news ;;
138 case "${target_vendor}" in
140 case "${target_os}" in
141 sunos3) gdb_target=sun2os3 ;;
142 sunos4) gdb_target=sun2os4 ;;
143 *) gdb_target=sun2 ;;
149 case "${target_vendor}" in
150 sony) gdb_target=news1000 ;;
154 none | np1 | pn | np1 | pn | pyramid | merlin | i960 | m88k | a29k)
155 gdb_target=${target_cpu} ;;
157 arm) gdb_target=${target_cpu} ;;
160 case "${target_vendor}" in
161 sony) gdb_target=bigmips ;;
162 dec) gdb_target=dec3100 ;;
163 little) gdb_target=littlemips ;;
167 c1 | c2) gdb_target=convex ;;
170 case "${target_vendor}" in
171 sco) gdb_target=i386sco ;;
172 sun) gdb_target=sun386 ;;
177 case "${target_vendor}" in
179 case "${target_os}" in
180 sunos3) gdb_target=sun4os3 ;;
181 sunos4) gdb_target=sun4os4 ;;
182 *) gdb_target=sun4 ;;
190 case "${target_vendor}" in
191 sequent) gdb_target=symmetry ;;
193 case "${target_os}" in
194 sysv) gdb_target=i386v ;;
195 sysv32) gdb_target=i386v32 ;;
201 case "${target_vendor}" in
202 wrs) gdb_target=vxworks960 ;;
203 intel) gdb_target=nindy960 ;;
208 case "${target_vendor}" in
209 utek) gdb_target=umax ;;
213 ### unhandled targets
220 if [ ! -f tconfig/${gdb_target} ]; then
221 echo '***' "Gdb does not support target ${target}" 1>&2
225 if [ -z "${removing}" ] ; then
226 cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
230 # We really shouldn't depend on there being a space after TM_FILE= ...
231 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
233 host_makefile_frag=xconfig/${gdb_host}
234 target_makefile_frag=tconfig/${gdb_target}
236 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
237 # ?config/* file, we don't make the corresponding links. But we have
238 # to remove the xm.h files and tm.h files anyway, e.g. when switching
239 # from "configure host" to "configure none".
243 if [ "${hostfile}" != "" ]; then
244 files="${files} ${hostfile}"
245 links="${links} xm.h"
248 if [ "${targetfile}" != "" ]; then
249 files="${files} ${targetfile}"
250 links="${links} tm.h"
259 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
260 echo "source ${srcdir}/.gdbinit" >> .gdbinit
263 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile