From 482950ed190564e45b1e19c686b322c33b47137f Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 5 Dec 2011 14:16:50 +0000 Subject: [PATCH] 2012-12-05 Pedro Alves * 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 | 7 +++++++ gdb/amd64-linux-nat.c | 9 --------- gdb/i386-linux-nat.c | 9 --------- gdb/i386bsd-nat.c | 9 --------- 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 971a1653200..bcd401e7f17 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2012-12-05 Pedro Alves + + * 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 * breakpoint.c (init_breakpoint_sal): Remove nested definitions of diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index caf2e963060..c67396562f5 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -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; } diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 187c49d9b58..7eb49ae7f01 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -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; } diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c index d46eaa4958c..fcd772fb939 100644 --- a/gdb/i386bsd-nat.c +++ b/gdb/i386bsd-nat.c @@ -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); } -- 2.30.2