aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386v4-nat.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-01-27 18:51:09 +0000
committerFred Fish <fnf@specifix.com>1996-01-27 18:51:09 +0000
commit4708ac6573eb1956616e58e6c936a05938f4915a (patch)
tree751d0488a58dc7b9dbb594d28c40c93e803c5100 /gdb/i386v4-nat.c
parent79edc8468f860448105028573e55426d205abf46 (diff)
downloadgdb-4708ac6573eb1956616e58e6c936a05938f4915a.zip
gdb-4708ac6573eb1956616e58e6c936a05938f4915a.tar.gz
gdb-4708ac6573eb1956616e58e6c936a05938f4915a.tar.bz2
* configure.in (AC_CHECK_HEADERS): Check for sys/procfs.h.
Also check for gregset_t and fpregset_t types. * configure: Regenerate. * core-regset.c (sys/procfs.h): Only include if HAVE_SYS_PROCFS_H is defined. (fetch_core_registers): Turn into stub unless both HAVE_GREGSET_T and HAVE_FPREGSET_T are defined. These changes allow systems like linux that are migrating to /proc support to use a single configuration for both new and old versions. * config/i386/linux.mt: Note that this is now for both a.out and ELF systems. * config/i386/linux.mh (NATDEPFILES): Add solib.o, core-regset.o, i386v4-nat.o * config/i386/tm-linux.h (tm-sysv4.h): Include. * config/i386/xm-linux.h (solib.h): Include (SVR4_SHARED_LIBS): Define. * i386v4-nat.c: Only compile if HAVE_SYS_PROCFS_H is defined. (supply_gregset, fill_gregset): Compile if HAVE_GREGSET_T defined. (supply_fpregset, fill_fpregset): Compile if HAVE_FPREGSET_T defined.
Diffstat (limited to 'gdb/i386v4-nat.c')
-rw-r--r--gdb/i386v4-nat.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/i386v4-nat.c b/gdb/i386v4-nat.c
index 1f1d38b..5febaf7 100644
--- a/gdb/i386v4-nat.c
+++ b/gdb/i386v4-nat.c
@@ -17,6 +17,8 @@ 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. */
+#ifdef HAVE_SYS_PROCFS_H
+
#include "defs.h"
#include <sys/procfs.h>
@@ -64,6 +66,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
*/
+#ifdef HAVE_GREGSET_T
+
/* This is a duplicate of the table in i386-xdep.c. */
static int regmap[] =
@@ -118,7 +122,9 @@ fill_gregset (gregsetp, regno)
}
}
-#if defined (FP0_REGNUM)
+#endif /* HAVE_GREGSET_T */
+
+#if defined (FP0_REGNUM) && defined (HAVE_FPREGSET_T)
/* Given a pointer to a floating point register set in /proc format
(fpregset_t *), unpack the register contents and supply them as gdb's
@@ -151,4 +157,6 @@ fill_fpregset (fpregsetp, regno)
/* FIXME: see m68k-tdep.c for an example, for the m68k. */
}
-#endif /* defined (FP0_REGNUM) */
+#endif /* defined (FP0_REGNUM) && defined (HAVE_FPREGSET_T) */
+
+#endif /* HAVE_SYS_PROCFS_H */