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 ;;
86 c1 | c2) gdb_host=convex ;;
89 case "${host_vendor}" in
90 umax) gdb_host=umax ;;
94 arm | vax | m88k | merlin | none | np1 | pn | pyramid | tahoe) gdb_host=${host_cpu} ;;
103 if [ ! -f xconfig/${gdb_host} ]; then
104 echo '***' "Gdb does not support host ${host}" 1>&2
108 # We really shouldn't depend on there being a space after XM_FILE= ...
109 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/${gdb_host}`
113 case "${target_cpu}" in
116 case "${target_vendor}" in
117 att) gdb_target=3b1 ;;
118 altos) gdb_target=altos ;;
120 case "${target_os}" in
121 bsd) gdb_target=hp300bsd ;;
122 hpux) gdb_target=hp300hpux ;;
126 case "${target_os}" in
127 sunos3) gdb_target=sun3os3 ;;
128 sunos4) gdb_target=sun3os4 ;;
129 *) gdb_target=sun3 ;;
132 wrs) gdb_target=vxworks68 ;;
133 isi) gdb_target=isi ;;
134 sony) gdb_target=news ;;
139 case "${target_vendor}" in
141 case "${target_os}" in
142 sunos3) gdb_target=sun2os3 ;;
143 sunos4) gdb_target=sun2os4 ;;
144 *) gdb_target=sun2 ;;
150 case "${target_vendor}" in
151 sony) gdb_target=news1000 ;;
155 none | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin | m88k)
156 gdb_target=${target_cpu} ;;
157 a29k) gdb_target=am29k ;;
158 arm) gdb_target=${target_cpu} ;;
161 case "${target_vendor}" in
162 sony) gdb_target=bigmips ;;
163 dec) gdb_target=dec3100 ;;
164 little) gdb_target=littlemips ;;
165 sgi) gdb_target=irix3 ;;
169 c1 | c2) gdb_target=convex ;;
172 case "${target_vendor}" in
174 case "${target_os}" in
175 sunos3) gdb_target=sun4os3 ;;
176 sunos4) gdb_target=sun4os4 ;;
177 *) gdb_target=sun4 ;;
185 case "${target_vendor}" in
186 sco) gdb_target=i386sco ;;
187 sun) gdb_target=sun386 ;;
188 sequent) gdb_target=symmetry ;;
189 coff) gdb_target=i386v ;;
190 aout) gdb_target=i386v ;;
192 case "${target_os}" in
193 sysv) gdb_target=i386v ;;
194 sysv32) gdb_target=i386v32 ;;
200 case "${target_vendor}" in
201 bout | wrs) gdb_target=vxworks960 ;;
202 coff | intel) gdb_target=nindy960 ;;
207 case "${target_vendor}" in
208 utek) gdb_target=umax ;;
212 ### unhandled targets
219 if [ ! -f tconfig/${gdb_target} ]; then
220 echo '***' "Gdb does not support target ${target}" 1>&2
224 if [ -z "${removing}" ] ; then
225 cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
229 # We really shouldn't depend on there being a space after TM_FILE= ...
230 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
232 host_makefile_frag=xconfig/${gdb_host}
233 target_makefile_frag=tconfig/${gdb_target}
235 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
236 # ?config/* file, we don't make the corresponding links. But we have
237 # to remove the xm.h files and tm.h files anyway, e.g. when switching
238 # from "configure host" to "configure none".
242 if [ "${hostfile}" != "" ]; then
243 files="${files} ${hostfile}"
244 links="${links} xm.h"
247 if [ "${targetfile}" != "" ]; then
248 files="${files} ${targetfile}"
249 links="${links} tm.h"
258 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
259 echo "source ${srcdir}/.gdbinit" >> .gdbinit
262 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile