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 ;;
68 sgi) gdb_host=irix3 ;;
73 case "${host_vendor}" in
74 sun) gdb_host=sun386 ;;
75 sco) gdb_host=i386sco ;;
76 sequent) gdb_host=symmetry ;;
79 sysv) gdb_host=i386v ;;
80 sysv32) gdb_host=i386v32 ;;
81 mach) gdb_host=i386mach ;;
87 c1 | c2) gdb_host=convex ;;
90 case "${host_vendor}" in
91 umax) gdb_host=umax ;;
103 arm | vax | m88k | merlin | none | np1 | pn | pyramid | tahoe)
114 if [ ! -f xconfig/${gdb_host} ]; then
115 echo '***' "Gdb does not support host ${host}" 1>&2
119 # We really shouldn't depend on there being a space after XM_FILE= ...
120 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/${gdb_host}`
124 case "${target_cpu}" in
127 case "${target_vendor}" in
128 att) gdb_target=3b1 ;;
129 altos) gdb_target=altos ;;
131 case "${target_os}" in
132 bsd) gdb_target=hp300bsd ;;
133 hpux) gdb_target=hp300hpux ;;
137 case "${target_os}" in
138 sunos3) gdb_target=sun3os3 ;;
139 sunos4) gdb_target=sun3os4 ;;
140 *) gdb_target=sun3 ;;
143 wrs) gdb_target=vxworks68 ;;
144 isi) gdb_target=isi ;;
145 sony) gdb_target=news ;;
150 case "${target_vendor}" in
152 case "${target_os}" in
153 sunos3) gdb_target=sun2os3 ;;
154 sunos4) gdb_target=sun2os4 ;;
155 *) gdb_target=sun2 ;;
161 case "${target_vendor}" in
162 sony) gdb_target=news1000 ;;
166 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin | m88k)
167 gdb_target=${target_cpu} ;;
170 case "${target_os}" in
171 none|aout|coff) gdb_target=a29k ;;
172 sym1) gdb_target=ultra3 ;;
173 kern) gdb_target=a29k-kern ;;
178 case "${target_vendor}" in
179 sony) gdb_target=bigmips ;;
180 dec) gdb_target=dec3100 ;;
181 little) gdb_target=littlemips ;;
182 sgi) gdb_target=irix3 ;;
186 c1 | c2) gdb_target=convex ;;
189 case "${target_vendor}" in
191 case "${target_os}" in
192 sunos3) gdb_target=sun4os3 ;;
193 sunos4) gdb_target=sun4os4 ;;
194 *) gdb_target=sun4 ;;
202 case "${target_vendor}" in
203 sco) gdb_target=i386sco ;;
204 sun) gdb_target=sun386 ;;
205 sequent) gdb_target=symmetry ;;
206 coff) gdb_target=i386v ;;
207 aout) gdb_target=i386v ;;
209 case "${target_os}" in
210 sysv) gdb_target=i386v ;;
211 sysv32) gdb_target=i386v32 ;;
212 mach) gdb_target=i386mach ;;
218 case "${target_vendor}" in
219 bout | wrs) gdb_target=vxworks960 ;;
220 coff | intel) gdb_target=nindy960 ;;
225 case "${target_vendor}" in
226 utek) gdb_target=umax ;;
230 ### unhandled targets
237 if [ ! -f tconfig/${gdb_target} ]; then
238 echo '***' "Gdb does not support target ${target}" 1>&2
242 if [ -z "${removing}" ] ; then
243 cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
247 # We really shouldn't depend on there being a space after TM_FILE= ...
248 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
250 host_makefile_frag=xconfig/${gdb_host}
251 target_makefile_frag=tconfig/${gdb_target}
253 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
254 # ?config/* file, we don't make the corresponding links. But we have
255 # to remove the xm.h files and tm.h files anyway, e.g. when switching
256 # from "configure host" to "configure none".
260 if [ "${hostfile}" != "" ]; then
261 files="${files} ${hostfile}"
262 links="${links} xm.h"
265 if [ "${targetfile}" != "" ]; then
266 files="${files} ${targetfile}"
267 links="${links} tm.h"
276 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
277 echo "source ${srcdir}/.gdbinit" >> .gdbinit
280 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile