diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-02-25 02:49:02 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-02-25 02:49:02 +0000 |
commit | 7ea814144a31ec40ca33111cec147bd691c6a93c (patch) | |
tree | 1d05ad94ccf558646e799c0782d640877daf4259 /gdb | |
parent | 080fe24b5824cf41b4f645c1c007dbe3d6eb2239 (diff) | |
download | gdb-7ea814144a31ec40ca33111cec147bd691c6a93c.zip gdb-7ea814144a31ec40ca33111cec147bd691c6a93c.tar.gz gdb-7ea814144a31ec40ca33111cec147bd691c6a93c.tar.bz2 |
2002-02-24 Daniel Jacobowitz <drow@mvista.com>
* gdbserver/configure.srv: New file.
* gdbserver/configure.in: Use configure.srv instead
of the host/target makefile fragments. Set GDBSERVER_DEPFILES
from it.
* gdbserver/configure: Regenerated.
* gdbserver/terminal.h: New file.
* gdbserver/Makefile.in: Update for configure changes. Remove
more unneeded include paths.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/gdbserver/Makefile.in | 24 | ||||
-rwxr-xr-x | gdb/gdbserver/configure | 39 | ||||
-rw-r--r-- | gdb/gdbserver/configure.in | 37 | ||||
-rw-r--r-- | gdb/gdbserver/configure.srv | 41 | ||||
-rw-r--r-- | gdb/gdbserver/terminal.h | 51 |
6 files changed, 117 insertions, 86 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index abbf334..00a9570 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2002-02-24 Daniel Jacobowitz <drow@mvista.com> + + * gdbserver/configure.srv: New file. + * gdbserver/configure.in: Use configure.srv instead + of the host/target makefile fragments. Set GDBSERVER_DEPFILES + from it. + * gdbserver/configure: Regenerated. + * gdbserver/terminal.h: New file. + * gdbserver/Makefile.in: Update for configure changes. Remove + more unneeded include paths. + 2002-02-24 Andrew Cagney <ac131313@redhat.com> From wiz at danbala: diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index f570da2..b758a7f 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -81,12 +81,9 @@ READLINE_DEP = $$(READLINE_DIR) # All the includes used for CFLAGS and for lint. # -I. for config files. -# -I.. for gdb's config files (especially config.h) -# -I${srcdir} possibly for regex.h also. -# -I${srcdir}/config for more generic config files. -# -I$(srcdir)/../regformats for regdef.h -INCLUDE_CFLAGS = -I. -I.. -I${srcdir} -I${srcdir}/.. \ - -I$(srcdir)/../regformats +# -I${srcdir} for our headers. +# -I$(srcdir)/../regformats for regdef.h. +INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../regformats # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS # from the config/ directory. @@ -111,11 +108,6 @@ DIST=gdb LINT=/usr/5bin/lint LINTFLAGS= $(BFD_CFLAGS) -# Host and target-dependent makefile fragments come in here. -@host_makefile_frag@ -@target_makefile_frag@ -# End of host and target-dependent makefile fragments - # All source files that go into linking GDB remote server. SFILES = $(srcdir)/low-hppabsd.c $(srcdir)/low-linux.c $(srcdir)/low-lynx.c \ @@ -123,12 +115,12 @@ SFILES = $(srcdir)/low-hppabsd.c $(srcdir)/low-linux.c $(srcdir)/low-lynx.c \ $(srcdir)/low-sun3.c $(srcdir)/utils.c $(srcdir)/server.c \ $(srcdir)/remote-utils.c -DEPFILES = $(GDBSERVER_DEPFILES) +DEPFILES = @GDBSERVER_DEPFILES@ -SOURCES = $(SFILES) $(ALLDEPFILES) +SOURCES = $(SFILES) TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS} -OBS = utils.o $(GDBSERVER_DEPFILES) server.o remote-utils.o regcache.o +OBS = utils.o $(DEPFILES) server.o remote-utils.o regcache.o # Prevent Sun make from putting in the machine type. Setting # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1. @@ -203,7 +195,7 @@ maintainer-clean realclean: clean STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb -Makefile: Makefile.in config.status @frags@ +Makefile: Makefile.in config.status $(SHELL) ./config.status config.status: configure @@ -236,7 +228,7 @@ regcache_h = $(srcdir)/regcache.h server_h = $(srcdir)/server.h $(regcache_h) server.o: server.c $(server_h) -remote-utils.o: remote-utils.c $(server_h) +remote-utils.o: remote-utils.c terminal.h $(server_h) utils.o: utils.c $(server_h) regcache.o: regcache.c $(server_h) $(regdef_h) diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index a83bb2a..27a340b 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -1146,41 +1146,12 @@ fi done -. ${srcdir}/../configure.host - -. ${srcdir}/../configure.tgt - -frags= -host_makefile_frag=${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh -if test ! -f ${host_makefile_frag}; then - { echo "configure: error: "*** GDB remote does not support host ${host}"" 1>&2; exit 1; } -fi -frags="$frags $host_makefile_frag" - -target_makefile_frag=${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt -if test ! -f ${target_makefile_frag}; then - { echo "configure: error: "*** GDB remote does not support target ${target}"" 1>&2; exit 1; } -fi -frags="$frags $target_makefile_frag" +. ${srcdir}/configure.srv +GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj" - -hostfile=`sed -n ' -s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p -' ${host_makefile_frag}` - -targetfile=`sed -n ' -s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p -' ${target_makefile_frag}` - -if test "${target}" = "${host}"; then -nativefile=`sed -n ' -s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p -' ${host_makefile_frag}` -fi - trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -1334,11 +1305,7 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@CPP@%$CPP%g -/@host_makefile_frag@/r $host_makefile_frag -s%@host_makefile_frag@%%g -/@target_makefile_frag@/r $target_makefile_frag -s%@target_makefile_frag@%%g -s%@frags@%$frags%g +s%@GDBSERVER_DEPFILES@%$GDBSERVER_DEPFILES%g CEOF EOF diff --git a/gdb/gdbserver/configure.in b/gdb/gdbserver/configure.in index fe43821..28f95a6 100644 --- a/gdb/gdbserver/configure.in +++ b/gdb/gdbserver/configure.in @@ -32,41 +32,10 @@ AC_HEADER_STDC AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h) -. ${srcdir}/../configure.host +. ${srcdir}/configure.srv -. ${srcdir}/../configure.tgt +GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj" -frags= -host_makefile_frag=${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh -if test ! -f ${host_makefile_frag}; then - AC_MSG_ERROR("*** GDB remote does not support host ${host}") -fi -frags="$frags $host_makefile_frag" - -target_makefile_frag=${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt -if test ! -f ${target_makefile_frag}; then - AC_MSG_ERROR("*** GDB remote does not support target ${target}") -fi -frags="$frags $target_makefile_frag" - -AC_SUBST_FILE(host_makefile_frag) -AC_SUBST_FILE(target_makefile_frag) -AC_SUBST(frags) - -changequote(,)dnl -hostfile=`sed -n ' -s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p -' ${host_makefile_frag}` - -targetfile=`sed -n ' -s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p -' ${target_makefile_frag}` - -if test "${target}" = "${host}"; then -nativefile=`sed -n ' -s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p -' ${host_makefile_frag}` -fi -changequote([,])dnl +AC_SUBST(GDBSERVER_DEPFILES) AC_OUTPUT(Makefile) diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv new file mode 100644 index 0000000..4b2ee7d --- /dev/null +++ b/gdb/gdbserver/configure.srv @@ -0,0 +1,41 @@ +# Mappings from configuration triplets to gdbserver build options. +# This is invoked from the autoconf-generated configure script, to +# produce the appropriate Makefile substitutions. + +# This file sets the following shell variables: +# srv_regobj The register protocol appropriate for this target. +# srv_tgtobj Any other target-specific modules appropriate +# for this target. +# +# In addition, on GNU/Linux the following shell variables will be set: +# srv_linux_regsets Set to "yes" if ptrace(PTRACE_GETREGS) and friends +# may be available on this platform; unset otherwise. + +# Input is taken from the "${target}" variable. + +case "${target}" in + arm*-*-linux*) srv_regobj=reg-arm.o + srv_tgtobj="linux-low.o linux-arm-low.o" + ;; + i[3456]86-*-linux*) srv_regobj=reg-i386.o + srv_tgtobj="linux-low.o linux-i386-low.o" + ;; + ia64-*-linux*) srv_regobj=reg-ia64.o + srv_tgtobj="linux-low.o linux-ia64-low.o" + ;; + m68*-*-linux*) srv_regobj=reg-m68k.o + srv_tgtobj="linux-low.o linux-m68k-low.o" + ;; + mips*-*-linux*) srv_regobj=reg-mips.o + srv_tgtobj="linux-low.o linux-mips-low.o" + ;; + powerpc*-*-linux*) srv_regobj=reg-ppc.o + srv_tgtobj="linux-low.o linux-ppc-low.o" + ;; + sh*-*-linux*) srv_regobj=reg-sh.o + srv_tgtobj="linux-low.o linux-sh-low.o" + ;; + *) echo "Error: target not supported by gdbserver." + exit 1 + ;; +esac diff --git a/gdb/gdbserver/terminal.h b/gdb/gdbserver/terminal.h new file mode 100644 index 0000000..69b6692 --- /dev/null +++ b/gdb/gdbserver/terminal.h @@ -0,0 +1,51 @@ +/* Terminal interface definitions for the GDB remote server. + Copyright 2002, Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#if !defined (TERMINAL_H) +#define TERMINAL_H 1 + +/* Autoconf will have defined HAVE_TERMIOS_H, HAVE_TERMIO_H, + and HAVE_SGTTY_H for us as appropriate. */ + +#if defined(HAVE_TERMIOS_H) +#define HAVE_TERMIOS +#include <termios.h> +#else /* ! HAVE_TERMIOS_H */ +#if defined(HAVE_TERMIO_H) +#define HAVE_TERMIO +#include <termio.h> + +#undef TIOCGETP +#define TIOCGETP TCGETA +#undef TIOCSETN +#define TIOCSETN TCSETA +#undef TIOCSETP +#define TIOCSETP TCSETAF +#define TERMINAL struct termio +#else /* ! HAVE_TERMIO_H; default to SGTTY. */ +#define HAVE_SGTTY +#include <fcntl.h> +#include <sgtty.h> +#include <sys/ioctl.h> +#define TERMINAL struct sgttyb +#endif +#endif + +#endif /* !defined (TERMINAL_H) */ |