2012-12-05 Pedro Alves <pedro@codesourcery.com>
authorPedro Alves <palves@redhat.com>
Mon, 5 Dec 2011 14:16:50 +0000 (14:16 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 5 Dec 2011 14:16:50 +0000 (14:16 +0000)
* amd64-linux-nat.c (amd64_linux_dr_get): Remove FIXME comment.
Reinstate perror_with_name call on ptrace error.  Remove #if 0.
* i386-linux-nat.c (i386_linux_dr_get): Likewise.
* i386bsd-nat.c (i386bsd_dr_get_status): Likewise.

gdb/ChangeLog
gdb/amd64-linux-nat.c
gdb/i386-linux-nat.c
gdb/i386bsd-nat.c

index 971a1653200dfaace62492cf476a32b49f56ab40..bcd401e7f17fc08413dad7abb82e2ebd9c1620d6 100644 (file)
@@ -1,3 +1,10 @@
+2012-12-05  Pedro Alves  <pedro@codesourcery.com>
+
+       * amd64-linux-nat.c (amd64_linux_dr_get): Remove FIXME comment.
+       Reinstate perror_with_name call on ptrace error.  Remove #if 0.
+       * i386-linux-nat.c (i386_linux_dr_get): Likewise.
+       * i386bsd-nat.c (i386bsd_dr_get_status): Likewise.
+
 2011-12-05  Andrey Smirnov  <andrew.smirnov@gmail.com>
 
        * breakpoint.c (init_breakpoint_sal): Remove nested definitions of
index caf2e963060cce9d67f5c83c3f31bb2b32a6ccc3..c67396562f535027a8c7dc68f28c96974367359d 100644 (file)
@@ -277,20 +277,11 @@ amd64_linux_dr_get (ptid_t ptid, int regnum)
   if (tid == 0)
     tid = PIDGET (ptid);
 
-  /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
-     ptrace call fails breaks debugging remote targets.  The correct
-     way to fix this is to add the hardware breakpoint and watchpoint
-     stuff to the target vector.  For now, just return zero if the
-     ptrace call fails.  */
   errno = 0;
   value = ptrace (PTRACE_PEEKUSER, tid,
                  offsetof (struct user, u_debugreg[regnum]), 0);
   if (errno != 0)
-#if 0
     perror_with_name (_("Couldn't read debug register"));
-#else
-    return 0;
-#endif
 
   return value;
 }
index 187c49d9b5882275d0854f0ad91e4312401712e1..7eb49ae7f012b8babc62b4df8ae9582a17f1a91d 100644 (file)
@@ -665,20 +665,11 @@ i386_linux_dr_get (ptid_t ptid, int regnum)
   if (tid == 0)
     tid = PIDGET (ptid);
 
-  /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
-     ptrace call fails breaks debugging remote targets.  The correct
-     way to fix this is to add the hardware breakpoint and watchpoint
-     stuff to the target vector.  For now, just return zero if the
-     ptrace call fails.  */
   errno = 0;
   value = ptrace (PTRACE_PEEKUSER, tid,
                  offsetof (struct user, u_debugreg[regnum]), 0);
   if (errno != 0)
-#if 0
     perror_with_name (_("Couldn't read debug register"));
-#else
-    return 0;
-#endif
 
   return value;
 }
index d46eaa4958ccc57b09b6d6d926d9e713c340ade6..fcd772fb9397ce3573c8baa919fca8ceec4eaede 100644 (file)
@@ -312,18 +312,9 @@ i386bsd_dr_get_status (void)
 {
   struct dbreg dbregs;
 
-  /* FIXME: kettenis/2001-03-31: Calling perror_with_name if the
-     ptrace call fails breaks debugging remote targets.  The correct
-     way to fix this is to add the hardware breakpoint and watchpoint
-     stuff to the target vector.  For now, just return zero if the
-     ptrace call fails.  */
   if (ptrace (PT_GETDBREGS, PIDGET (inferior_ptid),
              (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
-#if 0
     perror_with_name (_("Couldn't read debug registers"));
-#else
-    return 0;
-#endif
 
   return DBREG_DRX ((&dbregs), 6);
 }
This page took 0.030154 seconds and 4 git commands to generate.