From: Mark Kettenis Date: Thu, 30 Oct 2003 23:03:36 +0000 (+0000) Subject: * i386-tdep.c (i386_supply_fpregset): Support floating-point X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=66a72d250dbbacfac500c32ee25871ef6eea7fc5;p=binutils-gdb.git * i386-tdep.c (i386_supply_fpregset): Support floating-point registers in `fxsave' format. (i386_regset_from_core_section): Deal with ".reg-xfp" sections. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7e08e30a91a..b5a9fa507bf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-10-31 Mark Kettenis + + * i386-tdep.c (i386_supply_fpregset): Support floating-point + registers in `fxsave' format. + (i386_regset_from_core_section): Deal with ".reg-xfp" sections. + 2003-10-30 Mark Kettenis * i386-linux-tdep.c (i386_linux_gregset_reg_offset): New variable. diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index e8d42a12b97..69db1fa820e 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1576,6 +1576,12 @@ i386_supply_fpregset (const struct regset *regset, struct regcache *regcache, { 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 gdbarch *gdbarch, 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) {