Message ID | 20170605120737.GA13182@SDF.ORG |
---|---|
State | New, archived |
Headers |
Received: (qmail 42625 invoked by alias); 5 Jun 2017 12:07:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 42251 invoked by uid 89); 5 Jun 2017 12:07:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=dx X-HELO: mx.sdf.org Received: from ol.sdf.org (HELO mx.sdf.org) (205.166.94.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Jun 2017 12:07:38 +0000 Received: from sdf.org (IDENT:coypu@sdf.lonestar.org [205.166.94.15]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id v55C7bk9026513 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO) for <gdb-patches@sourceware.org>; Mon, 5 Jun 2017 12:07:37 GMT Received: (from coypu@localhost) by sdf.org (8.15.2/8.12.8/Submit) id v55C7bnZ027857 for gdb-patches@sourceware.org; Mon, 5 Jun 2017 12:07:37 GMT Date: Mon, 5 Jun 2017 12:07:37 +0000 From: coypu <coypu@sdf.org> To: gdb-patches@sourceware.org Subject: [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd Message-ID: <20170605120737.GA13182@SDF.ORG> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) |
Commit Message
coypu
June 5, 2017, 12:07 p.m. UTC
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(-)
Comments
On Monday, June 05, 2017 12:07:37 PM coypu wrote: > 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 This is fine with me in that I don't think it's worth providing the alternate definition for really-old FreeBSD that used dr0.
On Tue, Jun 06, 2017 at 10:43:24AM -0700, John Baldwin wrote: > On Monday, June 05, 2017 12:07:37 PM coypu wrote: > > 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 > > This is fine with me in that I don't think it's worth providing the alternate > definition for really-old FreeBSD that used dr0. > I can't commit. if it's ok, can someone do it? Thanks.
On Tue, Jun 06, 2017 at 10:43:24AM -0700, John Baldwin wrote: > On Monday, June 05, 2017 12:07:37 PM coypu wrote: > > 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 > > This is fine with me in that I don't think it's worth providing the alternate > definition for really-old FreeBSD that used dr0. > so... ping x2? why not commit it? I don't have commit access dealing with gnu's patch mailing lists is making me want to quit being involved with open source.
> On Tue, Jun 06, 2017 at 10:43:24AM -0700, John Baldwin wrote: >> This is fine with me in that I don't think it's worth providing the alternate >> definition for really-old FreeBSD that used dr0. John, since we have no active/official maintainer for any other BSD flavor, I think you should fell free to push changes in these BSD-related areas, after some reasonable period for comments. (I think we've waited enough already.) Thanks, Pedro Alves
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