2004-04-10 Mark Kettenis <kettenis@gnu.org>
+ * amd64-tdep.c (amd64_supply_fxsave): Only fiddle with
+ I387_FISEG_REGNUM and I387_FOSEG_REGNUM in 64-bit mode.
+ (amd64_collect_fxsave): Likewise.
+
* i386-sol2-tdep.c: Include "gdb_string.h".
(i386_sol2_sigtramp_p): Recognize signal trampoline based on its
name.
{
i387_supply_fxsave (regcache, regnum, fxsave);
- if (fxsave)
+ if (fxsave && gdbarch_ptr_bit (get_regcache_arch (regcache)) == 64)
{
const char *regs = fxsave;
i387_collect_fxsave (regcache, regnum, fxsave);
- if (regnum == -1 || regnum == I387_FISEG_REGNUM)
- regcache_raw_collect (regcache, I387_FISEG_REGNUM, regs + 12);
- if (regnum == -1 || regnum == I387_FOSEG_REGNUM)
- regcache_raw_collect (regcache, I387_FOSEG_REGNUM, regs + 20);
+ if (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 64)
+ {
+ if (regnum == -1 || regnum == I387_FISEG_REGNUM)
+ regcache_raw_collect (regcache, I387_FISEG_REGNUM, regs + 12);
+ if (regnum == -1 || regnum == I387_FOSEG_REGNUM)
+ regcache_raw_collect (regcache, I387_FOSEG_REGNUM, regs + 20);
+ }
}