2002-04-24 Daniel Jacobowitz <drow@mvista.com>
authorDaniel Jacobowitz <drow@false.org>
Wed, 24 Apr 2002 22:09:58 +0000 (22:09 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 24 Apr 2002 22:09:58 +0000 (22:09 +0000)
        * config/i386/tm-linux.h: Define FILL_FPXREGSET.
        * gregset.h: If FILL_FPXREGSET is defined, provide
        gdb_fpxregset_t, supply_fpxregset, and fill_fpxregset.
        * linux-proc.c (linux_do_thread_registers): If FILL_FPXREGSET
        is defined, call fill_fpxregset.

gdb/ChangeLog
gdb/config/i386/tm-linux.h
gdb/gregset.h
gdb/linux-proc.c

index b46f11f4309413df2fef5fc99f41074a8928de7c..534418e242a22ebbc3ca7f1020d1ec2007374951 100644 (file)
@@ -1,3 +1,11 @@
+2002-04-24  Daniel Jacobowitz  <drow@mvista.com>
+
+       * config/i386/tm-linux.h: Define FILL_FPXREGSET.
+       * gregset.h: If FILL_FPXREGSET is defined, provide
+       gdb_fpxregset_t, supply_fpxregset, and fill_fpxregset.
+       * linux-proc.c (linux_do_thread_registers): If FILL_FPXREGSET
+       is defined, call fill_fpxregset.
+
 2002-04-24  Roland McGrath  <roland@frob.com>
 
        * config/i386/i386gnu.mh (NATDEPFILES): Add core-regset.o here.
index 5c549b969e43a40a92c2c38b28acfdd3869b056a..60c4b1e3e39b90520c08b4573b9a56a1d6ca938a 100644 (file)
@@ -26,6 +26,7 @@
 #define I386_GNULINUX_TARGET
 #define HAVE_I387_REGS
 #ifdef HAVE_PTRACE_GETFPXREGS
+#define FILL_FPXREGSET
 #define HAVE_SSE_REGS
 #endif
 
index a3a13257906221f54d47d45f592551e5a97588d1..cb27517b6f0bf2d0bc7ce39166d76b6648d3271c 100644 (file)
@@ -52,5 +52,18 @@ extern void supply_fpregset (gdb_fpregset_t *fpregs);
 extern void fill_gregset (gdb_gregset_t *gregs, int regno);
 extern void fill_fpregset (gdb_fpregset_t *fpregs, int regno);
 
+#ifdef FILL_FPXREGSET
+/* Linux/i386: Copy register values between GDB's internal register cache
+   and the i386 extended floating point registers.  */
+
+#ifndef GDB_FPXREGSET_T
+#define GDB_FPXREGSET_T elf_fpxregset_t
+#endif
+
+typedef GDB_FPXREGSET_T gdb_fpxregset_t;
+
+extern void supply_fpxregset (gdb_fpxregset_t *fpxregs);
+extern void fill_fpxregset (gdb_fpxregset_t *fpxregs, int regno);
+#endif
 
 #endif
index 832f14eb91f88dfc8010c58c71f7cc4ee79ba2ee..aa3b5711da0d15b530ac128da12c93583d84aaef 100644 (file)
@@ -167,6 +167,9 @@ linux_do_thread_registers (bfd *obfd, ptid_t ptid,
 {
   gdb_gregset_t gregs;
   gdb_fpregset_t fpregs;
+#ifdef FILL_FPXREGSET
+  gdb_fpxregset_t fpxregs;
+#endif
   unsigned long merged_pid = ptid_get_tid (ptid) << 16 | ptid_get_pid (ptid);
 
   fill_gregset (&gregs, -1);
@@ -183,6 +186,14 @@ linux_do_thread_registers (bfd *obfd, ptid_t ptid,
                                              note_size, 
                                              &fpregs, 
                                              sizeof (fpregs));
+#ifdef FILL_FPXREGSET
+  fill_fpxregset (&fpxregs, -1);
+  note_data = (char *) elfcore_write_prxfpreg (obfd, 
+                                              note_data, 
+                                              note_size, 
+                                              &fpxregs, 
+                                              sizeof (fpxregs));
+#endif
   return note_data;
 }