Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Remove obsolete hardware watchpoint FIXMEs.
Date: Mon, 05 Dec 2011 14:52:00 -0000	[thread overview]
Message-ID: <20111205141746.31348.60583.stgit@localhost6.localdomain6> (raw)

The hardware breakpoint and watchpoint stuff do go through the target
vector nowadays.

Tested on x86_64-linux and applied.

2012-12-05  Pedro Alves  <pedro@codesourcery.com>

	gdb/
	* 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/amd64-linux-nat.c |    9 ---------
 gdb/i386-linux-nat.c  |    9 ---------
 gdb/i386bsd-nat.c     |    9 ---------
 3 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index caf2e96..c673965 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 187c49d..7eb49ae 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 d46eaa4..fcd772f 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);
 }


                 reply	other threads:[~2011-12-05 14:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111205141746.31348.60583.stgit@localhost6.localdomain6 \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox