From: coypu <coypu@sdf.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd
Date: Mon, 05 Jun 2017 12:07:00 -0000 [thread overview]
Message-ID: <20170605120737.GA13182@SDF.ORG> (raw)
This was originally inteded for freebsd~=5. freebsd has since moved
to the definition here, including the rename dr0->dr.
netbsd now uses the same definitions as freebsd, including the use
of dr instead of dr0, but doesn't provide this macro.
---
gdb/x86-bsd-nat.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gdb/x86-bsd-nat.c b/gdb/x86-bsd-nat.c
index 2ff661c1..81bd0ad1 100644
--- a/gdb/x86-bsd-nat.c
+++ b/gdb/x86-bsd-nat.c
@@ -51,10 +51,9 @@ x86bsd_mourn_inferior (struct target_ops *ops)
super_mourn_inferior (ops);
}
-/* Not all versions of FreeBSD/i386 that support the debug registers
- have this macro. */
+/* NetBSD doesn't provide a definition of this macro */
#ifndef DBREG_DRX
-#define DBREG_DRX(d, x) ((&d->dr0)[x])
+#define DBREG_DRX(d,x) ((d)->dr[(x)])
#endif
static unsigned long
--
2.12.2
next reply other threads:[~2017-06-05 12:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 12:07 coypu [this message]
2017-06-06 17:49 ` John Baldwin
2017-06-23 1:38 ` coypu
2017-07-06 0:14 ` Pedro Alves
2017-06-29 15:38 ` coypu
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=20170605120737.GA13182@SDF.ORG \
--to=coypu@sdf.org \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).