From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36408 invoked by alias); 23 Jun 2017 01:38:02 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 36390 invoked by uid 89); 23 Jun 2017 01:38:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=dx, Hx-languages-length:1303 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; Fri, 23 Jun 2017 01:37:59 +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 v5N1boAG009983 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO) for ; Fri, 23 Jun 2017 01:37:50 GMT Received: (from coypu@localhost) by sdf.org (8.15.2/8.12.8/Submit) id v5N1boe9016016 for gdb-patches@sourceware.org; Fri, 23 Jun 2017 01:37:50 GMT Date: Fri, 23 Jun 2017 01:38:00 -0000 From: coypu@sdf.org To: gdb-patches@sourceware.org Subject: Re: [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd Message-ID: <20170623013750.GA857@SDF.ORG> References: <20170605120737.GA13182@SDF.ORG> <1693366.iCsyRdA5ot@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1693366.iCsyRdA5ot@ralph.baldwin.cx> User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-06/txt/msg00667.txt.bz2 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.