From patchwork Mon Jun 5 12:07:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: coypu X-Patchwork-Id: 20791 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: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 ; 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 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-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) 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