public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] i386-fbsd-nat: Assume PT_GETXMMREGS is present.
@ 2022-03-02 22:14 John Baldwin
  0 siblings, 0 replies; only message in thread
From: John Baldwin @ 2022-03-02 22:14 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=63db53cd53c310d38d3adc486e725e44e466f449

commit 63db53cd53c310d38d3adc486e725e44e466f449
Author: John Baldwin <jhb@FreeBSD.org>
Date:   Wed Mar 2 14:09:55 2022 -0800

    i386-fbsd-nat: Assume PT_GETXMMREGS is present.
    
    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.

Diff:
---
 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 @@ public:
   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.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-02 22:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 22:14 [binutils-gdb] i386-fbsd-nat: Assume PT_GETXMMREGS is present John Baldwin

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).