From: John Baldwin <jhb@FreeBSD.org>
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 [thread overview]
Message-ID: <20220228223539.93563-2-jhb@FreeBSD.org> (raw)
In-Reply-To: <20220228223539.93563-1-jhb@FreeBSD.org>
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)
}
\f
-#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
next prev parent reply other threads:[~2022-02-28 22:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 22:35 [PATCH 0/3] Assume PT_GETXMMREGS is always present on *BSD/i386 John Baldwin
2022-02-28 22:35 ` John Baldwin [this message]
2022-03-01 14:22 ` [PATCH 1/3] i386-fbsd-nat: Assume PT_GETXMMREGS is present Simon Marchi
2022-03-01 18:25 ` John Baldwin
2022-02-28 22:35 ` [PATCH 2/3] i386-bsd-nat: " John Baldwin
2022-02-28 22:35 ` [PATCH 3/3] configure: Stop checking for PT_GETXMMREGS John Baldwin
2022-03-01 20:48 ` [PATCH 0/3] Assume PT_GETXMMREGS is always present on *BSD/i386 Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220228223539.93563-2-jhb@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).