1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / i386v4-nat.c
index 1f1d38b7eafe6e8aa6b652434f565bd6b471c367..ea84c651c4663772176e14e9fd6f2b46250375cc 100644 (file)
@@ -1,5 +1,5 @@
 /* Native-dependent code for SVR4 Unix running on i386's, for GDB.
-   Copyright 1988, 1989, 1991, 1992, 1996 Free Software Foundation, Inc.
+   Copyright 1988, 1989, 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -18,6 +18,15 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
+#include "value.h"
+
+#ifdef HAVE_SYS_REG_H
+#include <sys/reg.h>
+#endif
+
+
+#ifdef HAVE_SYS_PROCFS_H
+
 #include <sys/procfs.h>
 
 /*  The /proc interface divides the target machine's register set up into
@@ -64,6 +73,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[] = 
@@ -74,6 +85,16 @@ static int regmap[] =
   DS, ES, FS, GS,
 };
 
+/* Prototypes for local functions */
+
+void fill_gregset PARAMS ((gregset_t *, int));
+
+void supply_gregset PARAMS ((gregset_t *));
+
+void supply_fpregset PARAMS ((fpregset_t *));
+
+void fill_fpregset PARAMS ((fpregset_t *, int));
+
 
 /*  FIXME:  These routine absolutely depends upon (NUM_REGS - NUM_FREGS)
     being less than or equal to the number of registers that can be stored
@@ -118,7 +139,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
@@ -128,8 +151,6 @@ void
 supply_fpregset (fpregsetp)
      fpregset_t *fpregsetp;
 {
-  register int regi;
-  
   /* FIXME: see m68k-tdep.c for an example, for the m68k. */
 }
 
@@ -143,12 +164,9 @@ fill_fpregset (fpregsetp, regno)
      fpregset_t *fpregsetp;
      int regno;
 {
-  int regi;
-  char *to;
-  char *from;
-  extern char registers[];
-
   /* 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 */
This page took 0.02419 seconds and 4 git commands to generate.