From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GNhRHZ1S/2AcZwAAWB0awg (envelope-from ) for ; Mon, 26 Jul 2021 20:26:05 -0400 Received: by simark.ca (Postfix, from userid 112) id 760001EE01; Mon, 26 Jul 2021 20:26:05 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 21E1C1EDFB for ; Mon, 26 Jul 2021 20:26:04 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B2FA83959E52 for ; Tue, 27 Jul 2021 00:26:03 +0000 (GMT) Received: from mail.baldwin.cx (bigwig.baldwin.cx [66.216.25.90]) by sourceware.org (Postfix) with ESMTPS id EF2543896C1C for ; Tue, 27 Jul 2021 00:24:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EF2543896C1C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=FreeBSD.org Received: from gimli.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id AA87C1A84C54 for ; Mon, 26 Jul 2021 20:24:26 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 1/3] Don't compile x86 debug register support on OpenBSD. Date: Mon, 26 Jul 2021 17:24:19 -0700 Message-Id: <20210727002421.18947-2-jhb@FreeBSD.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210727002421.18947-1-jhb@FreeBSD.org> References: <20210727002421.18947-1-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.baldwin.cx [0.0.0.0]); Mon, 26 Jul 2021 20:24:27 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" - Change x86bsd_nat_target to only inherit from x86_nat_target if PT_GETDBREGS is supported. - Don't include x86-nat.o and nat/x86-dregs.o for OpenBSD/amd64. They were already omitted for OpenBSD/i386. --- gdb/configure.nat | 5 ++--- gdb/x86-bsd-nat.h | 9 +++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gdb/configure.nat b/gdb/configure.nat index e34cccffd9..655c75dd1a 100644 --- a/gdb/configure.nat +++ b/gdb/configure.nat @@ -451,9 +451,8 @@ case ${gdb_host} in case ${gdb_host_cpu} in i386) # Host: OpenBSD/amd64 - NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o x86-nat.o \ - x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o \ - nat/x86-dregs.o" + NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \ + x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o" LOADLIBES='-lkvm' ;; mips) diff --git a/gdb/x86-bsd-nat.h b/gdb/x86-bsd-nat.h index 02d61c20b0..caf62e38df 100644 --- a/gdb/x86-bsd-nat.h +++ b/gdb/x86-bsd-nat.h @@ -27,18 +27,23 @@ extern size_t x86bsd_xsave_len; /* A prototype *BSD/x86 target. */ +#ifdef HAVE_PT_GETDBREGS template class x86bsd_nat_target : public x86_nat_target { using base_class = x86_nat_target; public: -#ifdef HAVE_PT_GETDBREGS void mourn_inferior () override { x86_cleanup_dregs (); base_class::mourn_inferior (); } +}; +#else /* !HAVE_PT_GETDBREGS */ +template +class x86bsd_nat_target : public BaseTarget +{ +}; #endif /* HAVE_PT_GETDBREGS */ -}; #endif /* x86-bsd-nat.h */ -- 2.31.1