* cadillac.c (kernel_dispatch): Make return type void.
[deliverable/binutils-gdb.git] / gdb / sparc-xdep.c
index 003829e88d61b47783002d88e151805c246ccf3c..2cc150e19e8d347326d402d4a3f367661bfa0dc9 100644 (file)
@@ -1,5 +1,5 @@
 /* Host-dependent code for SPARC host systems, for GDB, the GNU debugger.
-   Copyright 1986, 1987, 1989, 1990, 1991  Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -17,22 +17,22 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
+/* This code only compiles when we have the definitions in tm-sparc.h.  */
+
+#define        TM_FILE_OVERRIDE
 #include "defs.h"
+#include "tm-sparc.h"
+
 #include "inferior.h"
 #include "target.h"
 
 #include <sys/param.h>
-#include <sys/file.h>          /* For L_SET */
-
 #include <sys/ptrace.h>
 #include <machine/reg.h>
 
 #include "gdbcore.h"
 #include <sys/core.h>
 
-extern char register_valid[];
-
 /* We don't store all registers immediately when requested, since they
    get sent over in large chunks anyway.  Instead, we accumulate most
    of the changes and send them over once.  "deferred_stores" keeps
@@ -71,8 +71,9 @@ fetch_inferior_registers (regno)
       || regno >= Y_REGNUM
       || (!register_valid[SP_REGNUM] && regno < I7_REGNUM))
     {
-      if (0 != ptrace (PTRACE_GETREGS, inferior_pid, &inferior_registers))
-           perror("ptrace_getregs");
+      if (0 != ptrace (PTRACE_GETREGS, inferior_pid,
+                      (PTRACE_ARG3_TYPE) &inferior_registers, 0))
+       perror("ptrace_getregs");
       
       registers[REGISTER_BYTE (0)] = 0;
       bcopy (&inferior_registers.r_g1, &registers[REGISTER_BYTE (1)], 15 * REGISTER_RAW_SIZE (G0_REGNUM));
@@ -98,7 +99,9 @@ fetch_inferior_registers (regno)
   /* Floating point registers */
   if (regno == -1 || (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 31))
     {
-      if (0 != ptrace (PTRACE_GETFPREGS, inferior_pid, &inferior_fp_registers))
+      if (0 != ptrace (PTRACE_GETFPREGS, inferior_pid,
+                      (PTRACE_ARG3_TYPE) &inferior_fp_registers,
+                      0))
            perror("ptrace_getfpregs");
       bcopy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
             sizeof inferior_fp_registers.fpu_fr);
@@ -136,7 +139,7 @@ fetch_inferior_registers (regno)
    If REGNO is -1, do this for all registers.
    Otherwise, REGNO specifies which register (so we can save time).  */
 
-int
+void
 store_inferior_registers (regno)
      int regno;
 {
@@ -177,7 +180,7 @@ store_inferior_registers (regno)
       else
        {
          deferred_stores |= wanna_store;
-         return 0;
+         return;
        }
     }
 
@@ -218,7 +221,8 @@ store_inferior_registers (regno)
       inferior_registers.r_y =
        *(int *)&registers[REGISTER_BYTE (Y_REGNUM)];
 
-      if (0 != ptrace (PTRACE_SETREGS, inferior_pid, &inferior_registers))
+      if (0 != ptrace (PTRACE_SETREGS, inferior_pid,
+                      (PTRACE_ARG3_TYPE) &inferior_registers, 0))
        perror("ptrace_setregs");
     }
 
@@ -234,17 +238,18 @@ store_inferior_registers (regno)
             sizeof (FPU_FSR_TYPE));
 ****/
       if (0 !=
-        ptrace (PTRACE_SETFPREGS, inferior_pid, &inferior_fp_registers))
+        ptrace (PTRACE_SETFPREGS, inferior_pid,
+                (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0))
         perror("ptrace_setfpregs");
     }
-    return 0;
 }
 \f
 void
-fetch_core_registers (core_reg_sect, core_reg_size, which)
+fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
   char *core_reg_sect;
   unsigned core_reg_size;
   int which;
+  unsigned int ignore; /* reg addr, unused in this version */
 {
 
   if (which == 0) {
This page took 0.024847 seconds and 4 git commands to generate.