diff options
author | Daniel Jacobowitz <dan@debian.org> | 2002-04-24 22:09:58 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2002-04-24 22:09:58 +0000 |
commit | 5df1ba375abe2c9d11dc7365a8d39f304abba8f7 (patch) | |
tree | 60a2f1a82dfe47e017b55e52f5f043cc88e4647d /gdb | |
parent | 24a689046fd39ea8563d5f6a0c778cb5a5a5c8f9 (diff) | |
download | gdb-5df1ba375abe2c9d11dc7365a8d39f304abba8f7.tar.gz |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/config/i386/tm-linux.h | 1 | ||||
-rw-r--r-- | gdb/gregset.h | 13 | ||||
-rw-r--r-- | gdb/linux-proc.c | 11 |
4 files changed, 33 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b46f11f4309..534418e242a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/config/i386/tm-linux.h b/gdb/config/i386/tm-linux.h index 5c549b969e4..60c4b1e3e39 100644 --- a/gdb/config/i386/tm-linux.h +++ b/gdb/config/i386/tm-linux.h @@ -26,6 +26,7 @@ #define I386_GNULINUX_TARGET #define HAVE_I387_REGS #ifdef HAVE_PTRACE_GETFPXREGS +#define FILL_FPXREGSET #define HAVE_SSE_REGS #endif diff --git a/gdb/gregset.h b/gdb/gregset.h index a3a13257906..cb27517b6f0 100644 --- a/gdb/gregset.h +++ b/gdb/gregset.h @@ -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 diff --git a/gdb/linux-proc.c b/gdb/linux-proc.c index 832f14eb91f..aa3b5711da0 100644 --- a/gdb/linux-proc.c +++ b/gdb/linux-proc.c @@ -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; } |