From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.baldwin.cx (unknown [IPv6:2607:f138:0:13::2]) by sourceware.org (Postfix) with ESMTPS id 32AA33858C74 for ; Mon, 28 Feb 2022 22:35:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 32AA33858C74 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 6E7501A84C6B for ; Mon, 28 Feb 2022 17:35:52 -0500 (EST) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 2/3] i386-bsd-nat: Assume PT_GETXMMREGS is present. Date: Mon, 28 Feb 2022 14:35:38 -0800 Message-Id: <20220228223539.93563-3-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=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, 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 NetBSD has included PT_GETXMMREGS since 1.6 released in September 2002. OpenBSD has included PT_GETXMMREGS since 3.8 released in November 2005. --- gdb/i386-bsd-nat.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gdb/i386-bsd-nat.c b/gdb/i386-bsd-nat.c index bd9655c9ef9..97a9738c52b 100644 --- a/gdb/i386-bsd-nat.c +++ b/gdb/i386-bsd-nat.c @@ -92,11 +92,9 @@ static int i386bsd_r_reg_offset[] = #define GETREGS_SUPPLIES(regnum) \ ((0 <= (regnum) && (regnum) <= 15)) -#ifdef HAVE_PT_GETXMMREGS /* Set to 1 if the kernel supports PT_GETXMMREGS. Initialized to -1 so that we try PT_GETXMMREGS the first time around. */ static int have_ptrace_xmmregs = -1; -#endif /* Supply the general-purpose registers in GREGS, to REGCACHE. */ @@ -162,7 +160,6 @@ i386bsd_fetch_inferior_registers (struct regcache *regcache, int regnum) if (regnum == -1 || regnum >= I386_ST0_REGNUM) { struct fpreg fpregs; -#ifdef HAVE_PT_GETXMMREGS char xmmregs[512]; if (have_ptrace_xmmregs != 0 @@ -175,15 +172,12 @@ i386bsd_fetch_inferior_registers (struct regcache *regcache, int regnum) else { have_ptrace_xmmregs = 0; -#endif if (gdb_ptrace (PT_GETFPREGS, ptid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) perror_with_name (_("Couldn't get floating point status")); i387_supply_fsave (regcache, -1, &fpregs); -#ifdef HAVE_PT_GETXMMREGS } -#endif } } @@ -214,7 +208,6 @@ i386bsd_store_inferior_registers (struct regcache *regcache, int regnum) if (regnum == -1 || regnum >= I386_ST0_REGNUM) { struct fpreg fpregs; -#ifdef HAVE_PT_GETXMMREGS char xmmregs[512]; if (have_ptrace_xmmregs != 0 @@ -232,7 +225,6 @@ i386bsd_store_inferior_registers (struct regcache *regcache, int regnum) else { have_ptrace_xmmregs = 0; -#endif if (gdb_ptrace (PT_GETFPREGS, ptid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) perror_with_name (_("Couldn't get floating point status")); @@ -242,9 +234,7 @@ i386bsd_store_inferior_registers (struct regcache *regcache, int regnum) if (gdb_ptrace (PT_SETFPREGS, ptid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) perror_with_name (_("Couldn't write floating point status")); -#ifdef HAVE_PT_GETXMMREGS } -#endif } } -- 2.34.1