PR gdb/17384: Do not print memory errors in safe_read_memory_integer
[platform/upstream/binutils.git] / gdb / shnbsd-nat.c
index f66571a..4278a55 100644 (file)
@@ -1,7 +1,6 @@
 /* Native-dependent code for NetBSD/sh.
 
-   Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2002-2014 Free Software Foundation, Inc.
 
    Contributed by Wasabi Systems, Inc.
 
@@ -50,7 +49,7 @@ shnbsd_fetch_inferior_registers (struct target_ops *ops,
     {
       struct reg inferior_registers;
 
-      if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
                  (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
        perror_with_name (_("Couldn't get registers"));
 
@@ -71,7 +70,7 @@ shnbsd_store_inferior_registers (struct target_ops *ops,
     {
       struct reg inferior_registers;
 
-      if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
                  (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
        perror_with_name (_("Couldn't get registers"));
 
@@ -79,7 +78,7 @@ shnbsd_store_inferior_registers (struct target_ops *ops,
                                  (char *) &inferior_registers,
                                  SHNBSD_SIZEOF_GREGS);
 
-      if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
                  (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
        perror_with_name (_("Couldn't set registers"));