diff options
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 1e68505..8f8cc99 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3806,26 +3806,6 @@ i386_collect_fpregset (const struct regset *regset, i387_collect_fsave (regcache, regnum, fpregs); } -/* Similar to i386_supply_fpregset, but use XSAVE extended state. */ - -static void -i386_supply_xstateregset (const struct regset *regset, - struct regcache *regcache, int regnum, - const void *xstateregs, size_t len) -{ - i387_supply_xsave (regcache, regnum, xstateregs); -} - -/* Similar to i386_collect_fpregset , but use XSAVE extended state. */ - -static void -i386_collect_xstateregset (const struct regset *regset, - const struct regcache *regcache, - int regnum, void *xstateregs, size_t len) -{ - i387_collect_xsave (regcache, regnum, xstateregs, 1); -} - /* Register set definitions. */ const struct regset i386_gregset = @@ -3833,16 +3813,11 @@ const struct regset i386_gregset = NULL, i386_supply_gregset, i386_collect_gregset }; -static const struct regset i386_fpregset = +const struct regset i386_fpregset = { NULL, i386_supply_fpregset, i386_collect_fpregset }; -static const struct regset i386_xstateregset = - { - NULL, i386_supply_xstateregset, i386_collect_xstateregset - }; - /* Return the appropriate register set for the core section identified by SECT_NAME and SECT_SIZE. */ @@ -3853,15 +3828,10 @@ i386_regset_from_core_section (struct gdbarch *gdbarch, struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (strcmp (sect_name, ".reg") == 0 && sect_size == tdep->sizeof_gregset) - return &i386_gregset; - - if ((strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset) - || (strcmp (sect_name, ".reg-xfp") == 0 - && sect_size == I387_SIZEOF_FXSAVE)) - return &i386_fpregset; + return &i386_gregset; - if (strcmp (sect_name, ".reg-xstate") == 0) - return &i386_xstateregset; + if (strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset) + return tdep->fpregset; return NULL; } @@ -8291,6 +8261,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Floating-point registers. */ tdep->sizeof_fpregset = I387_SIZEOF_FSAVE; + tdep->fpregset = &i386_fpregset; /* The default settings include the FPU registers, the MMX registers and the SSE registers. This can be overridden for a specific ABI @@ -8595,7 +8566,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* If we have a register mapping, enable the generic core file support, unless it has already been enabled. */ if (tdep->gregset_reg_offset - && !gdbarch_regset_from_core_section_p (gdbarch)) + && !gdbarch_regset_from_core_section_p (gdbarch) + && !gdbarch_iterate_over_regset_sections_p (gdbarch)) set_gdbarch_regset_from_core_section (gdbarch, i386_regset_from_core_section); |