2001-07-07 Ben Elliston <bje@redhat.com>
[deliverable/binutils-gdb.git] / gdb / alphabsd-nat.c
index 40937a8194396969c6fe85ff303f8e5c8d43f03a..5e7a3618f809ca9a20ab4341383f71cc8aa316f2 100644 (file)
@@ -1,5 +1,5 @@
 /* Native-dependent code for Alpha BSD's.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,7 @@
 
 #include "defs.h"
 #include "inferior.h"
+#include "regcache.h"
 
 #include <sys/types.h>
 #include <sys/ptrace.h>
@@ -48,7 +49,7 @@ typedef struct fpreg fpregset_t;
 
 /* Transfering the registers between GDB, inferiors and core files.  */
 
-/* Fill GDB's register array with the genereal-purpose register values
+/* Fill GDB's register array with the general-purpose register values
    in *GREGSETP.  */
 
 void
@@ -134,7 +135,8 @@ fetch_inferior_registers (int regno)
 {
   gregset_t gregs;
 
-  if (ptrace (PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+  if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+              (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
     perror_with_name ("Couldn't get registers");
 
   supply_gregset (&gregs);
@@ -143,7 +145,7 @@ fetch_inferior_registers (int regno)
     {
       fpregset_t fpregs;
 
-      if (ptrace (PT_GETFPREGS, inferior_pid,
+      if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
                  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
        perror_with_name ("Couldn't get floating point status");
 
@@ -162,25 +164,27 @@ store_inferior_registers (int regno)
 {
   gregset_t gregs;
 
-  if (ptrace (PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+  if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+              (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
     perror_with_name ("Couldn't get registers");
 
   fill_gregset (&gregs, regno);
 
-  if (ptrace (PT_SETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+  if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+              (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
     perror_with_name ("Couldn't write registers");
 
   if (regno == -1 || regno >= FP0_REGNUM)
     {
       fpregset_t fpregs;
 
-      if (ptrace (PT_GETFPREGS, inferior_pid,
+      if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
                  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
        perror_with_name ("Couldn't get floating point status");
 
       fill_fpregset (&fpregs, regno);
 
-      if (ptrace (PT_SETFPREGS, inferior_pid,
+      if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
                  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
        perror_with_name ("Couldn't write floating point status");
     }
This page took 0.025009 seconds and 4 git commands to generate.