]> Git Repo - binutils.git/blobdiff - gdb/hppab-nat.c
Removed board dependant stuff.
[binutils.git] / gdb / hppab-nat.c
index 752b370f40d53e24b9de406ad5025b443bf5c779..3d2ca9766147482585d2a85e73abd62227b9e0b3 100644 (file)
@@ -1,7 +1,7 @@
 /* Machine-dependent hooks for the unix child process stratum.  This
    code is for the HP PA-RISC cpu.
 
-   Copyright 1986, 1987, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
    University of Utah ([email protected]).
@@ -24,10 +24,20 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "defs.h"
 #include "inferior.h"
+#include "target.h"
+#include <sys/ptrace.h>
+
+#ifdef FIVE_ARG_PTRACE
+
+/* Deal with HPUX 8.0 braindamage.  */
+#define ptrace(a,b,c,d) ptrace(a,b,c,d,0)
+
+#endif
 
 #ifndef PT_ATTACH
 #define PT_ATTACH PTRACE_ATTACH
 #endif
+
 #ifndef PT_DETACH
 #define PT_DETACH PTRACE_DETACH
 #endif
@@ -35,7 +45,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* This function simply calls ptrace with the given arguments.  
    It exists so that all calls to ptrace are isolated in this 
    machine-dependent file. */
-#ifdef WANT_NATIVE_TARGET
+
 int
 call_ptrace (request, pid, addr, data)
      int request, pid;
@@ -44,7 +54,6 @@ call_ptrace (request, pid, addr, data)
 {
   return ptrace (request, pid, addr, data);
 }
-#endif /* WANT_NATIVE_TARGET */
 
 #ifdef DEBUG_PTRACE
 /* For the rest of the file, use an extra level of indirection */
@@ -63,9 +72,6 @@ kill_inferior ()
 }
 
 #ifdef ATTACH_DETACH
-/* Nonzero if we are debugging an attached process rather than
-   an inferior.  */
-extern int attach_flag;
 
 /* Start debugging the process whose number is PID.  */
 int
@@ -242,7 +248,7 @@ store_inferior_registers (regno)
       for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof(int))
        {
          errno = 0;
-         ptrace (PT_WRITE_U, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
+         ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
                  *(int *) &registers[REGISTER_BYTE (regno) + i]);
          if (errno != 0)
            {
@@ -262,7 +268,7 @@ store_inferior_registers (regno)
          for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof(int))
            {
              errno = 0;
-             ptrace (PT_WRITE_U, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
+             ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
                      *(int *) &registers[REGISTER_BYTE (regno) + i]);
              if (errno != 0)
                {
This page took 0.02639 seconds and 4 git commands to generate.