This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Add support for .reg-xfp sections
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 31 Oct 2003 00:04:30 +0100 (CET)
- Subject: [PATCH] Add support for .reg-xfp sections
Some of my earlier patches this evening probably broke the reading of
core files with SSE registers on GNU/Linux. This should fix that.
Committed.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386-tdep.c (i386_supply_fpregset): Support floating-point
registers in `fxsave' format.
(i386_regset_from_core_section): Deal with ".reg-xfp" sections.
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.173
diff -u -p -r1.173 i386-tdep.c
--- i386-tdep.c 26 Oct 2003 13:08:56 -0000 1.173
+++ i386-tdep.c 30 Oct 2003 23:01:58 -0000
@@ -1576,6 +1576,12 @@ i386_supply_fpregset (const struct regse
{
const struct gdbarch_tdep *tdep = regset->descr;
+ if (len == I387_SIZEOF_FXSAVE)
+ {
+ i387_supply_fxsave (regcache, regnum, fpregs);
+ return;
+ }
+
gdb_assert (len == tdep->sizeof_fpregset);
i387_supply_fsave (regcache, regnum, fpregs);
}
@@ -1600,7 +1606,9 @@ i386_regset_from_core_section (struct gd
return tdep->gregset;
}
- if (strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset)
+ if ((strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset)
+ || (strcmp (sect_name, ".reg-xfp") == 0
+ && sect_size == I387_SIZEOF_FXSAVE))
{
if (tdep->fpregset == NULL)
{