* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / hppab-nat.c
index a77195ae721bd07cca6fd76787eaa8a41afa4815..b45af8462c1660cf8f605d218a291f3456ec4ba5 100644 (file)
@@ -27,13 +27,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #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
@@ -52,14 +45,15 @@ call_ptrace (request, pid, addr, data)
      PTRACE_ARG3_TYPE addr;
      int data;
 {
-  return ptrace (request, pid, addr, data);
+  return ptrace (request, pid, addr, data, 0);
 }
 
-#ifdef DEBUG_PTRACE
-/* For the rest of the file, use an extra level of indirection */
-/* This lets us breakpoint usefully on call_ptrace. */
+/* Use an extra level of indirection for ptrace calls.
+   This lets us breakpoint usefully on call_ptrace.   It also
+   allows us to pass an extra argument to ptrace without
+   using an ANSI-C specific macro.  */
+
 #define ptrace call_ptrace
-#endif
 
 void
 kill_inferior ()
@@ -239,7 +233,6 @@ store_inferior_registers (regno)
              char *msg = alloca (strlen (err) + 128);
              sprintf (msg, "writing register %s: %s", reg_names[regno], err);
              warning (msg);
-             errors_found = 1;
            }
          regaddr += sizeof(int);
        }
@@ -256,12 +249,13 @@ store_inferior_registers (regno)
   return;
 }
 
-/* Resume execution of the inferior process.
+/* Resume execution of process PID.
    If STEP is nonzero, single-step it.
    If SIGNAL is nonzero, give it that signal.  */
 
 void
-child_resume (step, signal)
+child_resume (pid, step, signal)
+     int pid;
      int step;
      int signal;
 {
@@ -272,9 +266,9 @@ child_resume (step, signal)
      written a new PC value to the child.)  */
 
   if (step)
-    ptrace (PT_STEP, inferior_pid, (PTRACE_ARG3_TYPE) 1, signal);
+    ptrace (PT_STEP, pid, (PTRACE_ARG3_TYPE) 1, signal);
   else
-    ptrace (PT_CONTINUE, inferior_pid, (PTRACE_ARG3_TYPE) 1, signal);
+    ptrace (PT_CONTINUE, pid, (PTRACE_ARG3_TYPE) 1, signal);
 
   if (errno)
     perror_with_name ("ptrace");
@@ -332,7 +326,7 @@ child_xfer_memory (memaddr, myaddr, len, write, target)
 
       /* Copy data to be written over corresponding part of buffer */
 
-      bcopy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
+      memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
 
       /* Write the entire buffer.  */
 
@@ -367,7 +361,7 @@ child_xfer_memory (memaddr, myaddr, len, write, target)
        }
 
       /* Copy appropriate bytes out of the buffer.  */
-      bcopy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
+      memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
     }
   return len;
 }
This page took 0.024504 seconds and 4 git commands to generate.