From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.baldwin.cx (bigwig.baldwin.cx [66.216.25.90]) by sourceware.org (Postfix) with ESMTPS id 026D03858C83 for ; Mon, 28 Feb 2022 22:35:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 026D03858C83 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 ralph.com (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id D78A61A84BF2 for ; Mon, 28 Feb 2022 17:35:51 -0500 (EST) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 1/3] i386-fbsd-nat: Assume PT_GETXMMREGS is present. Date: Mon, 28 Feb 2022 14:35:37 -0800 Message-Id: <20220228223539.93563-2-jhb@FreeBSD.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220228223539.93563-1-jhb@FreeBSD.org> References: <20220228223539.93563-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, 28 Feb 2022 17:35:52 -0500 (EST) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KHOP_HELO_FCRDNS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 28 Feb 2022 22:35:54 -0000 PT_GETXMMREGS was first added in FreeBSD 6.0 released in November 2005. The last FreeBSD release without support was 5.5 released in May 2006. --- gdb/i386-fbsd-nat.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/gdb/i386-fbsd-nat.c b/gdb/i386-fbsd-nat.c index 6fb67434a2d..a6ced66250c 100644 --- a/gdb/i386-fbsd-nat.c +++ b/gdb/i386-fbsd-nat.c @@ -42,9 +42,7 @@ class i386_fbsd_nat_target final void fetch_registers (struct regcache *, int) override; void store_registers (struct regcache *, int) override; -#if defined(PT_GETXMMREGS) || defined(PT_GETXSTATE_INFO) const struct target_desc *read_description () override; -#endif void resume (ptid_t, int, enum gdb_signal) override; @@ -59,9 +57,7 @@ static i386_fbsd_nat_target the_i386_fbsd_nat_target; static size_t xsave_len; #endif -#ifdef HAVE_PT_GETXMMREGS static int have_ptrace_xmmregs; -#endif /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this for all registers. */ @@ -126,7 +122,6 @@ i386_fbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum) return; } #endif -#ifdef HAVE_PT_GETXMMREGS if (have_ptrace_xmmregs != 0) { char xmmregs[I387_SIZEOF_FXSAVE]; @@ -137,7 +132,6 @@ i386_fbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum) i387_supply_fxsave (regcache, regnum, xmmregs); return; } -#endif struct fpreg fpregs; @@ -214,7 +208,6 @@ i386_fbsd_nat_target::store_registers (struct regcache *regcache, int regnum) return; } #endif -#ifdef HAVE_PT_GETXMMREGS if (have_ptrace_xmmregs != 0) { char xmmregs[I387_SIZEOF_FXSAVE]; @@ -228,7 +221,6 @@ i386_fbsd_nat_target::store_registers (struct regcache *regcache, int regnum) perror_with_name (_("Couldn't write XMM registers")); return; } -#endif struct fpreg fpregs; @@ -324,7 +316,6 @@ i386fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) } -#if defined(PT_GETXMMREGS) || defined(PT_GETXSTATE_INFO) /* Implement the read_description method. */ const struct target_desc * @@ -334,9 +325,7 @@ i386_fbsd_nat_target::read_description () static int xsave_probed; static uint64_t xcr0; #endif -#ifdef PT_GETXMMREGS static int xmm_probed; -#endif #ifdef PT_GETXSTATE_INFO if (!xsave_probed) @@ -356,7 +345,6 @@ i386_fbsd_nat_target::read_description () return i386_target_description (xcr0, true); #endif -#ifdef PT_GETXMMREGS if (!xmm_probed) { char xmmregs[I387_SIZEOF_FXSAVE]; @@ -369,11 +357,9 @@ i386_fbsd_nat_target::read_description () if (have_ptrace_xmmregs) return i386_target_description (X86_XSTATE_SSE_MASK, true); -#endif return i386_target_description (X86_XSTATE_X87_MASK, true); } -#endif #if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO) /* Implement the supports_stopped_by_hw_breakpoints method. */ -- 2.34.1