diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-03-29 10:04:26 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-09-30 09:14:35 +0200 |
commit | 490496c342237f3fa2dd92adfe9e34516991f451 (patch) | |
tree | 53945c468e9874a7c7a6ab6b125a82101f5cde31 /gdb/i386obsd-tdep.c | |
parent | 50c5eb5335ff58688fd4652a40c791088a94d532 (diff) | |
download | gdb-490496c342237f3fa2dd92adfe9e34516991f451.zip gdb-490496c342237f3fa2dd92adfe9e34516991f451.tar.gz gdb-490496c342237f3fa2dd92adfe9e34516991f451.tar.bz2 |
X86: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'
For all I386 and AMD64 targets, replace all occurrences of
regset_from_core_section by the iterator method.
gdb/ChangeLog:
* amd64obsd-tdep.c (amd64obsd_regset_from_core_section): Remove.
(amd64obsd_iterate_over_regset_sections): New.
(amd64obsd_core_init_abi): Adjust gdbarch initialization.
* i386-cygwin-tdep.c (i386_windows_regset_from_core_section):
Remove.
(i386_cygwin_init_abi): Clear tdep->sizeof_fpregset. Drop
regset_from_core_section initialization.
* i386-tdep.c (i386_regset_from_core_section): Remove.
(i386_iterate_over_regset_sections): New.
(i386_gdbarch_init): Adjust gdbarch initialization.
* i386-tdep.h (i386_regset_from_core_section): Remove prototype.
(i386_iterate_over_regset_sections): New prototype.
* i386obsd-tdep.c (i386obsd_aout_regset_from_core_section):
Remove.
(i386obsd_aout_iterate_over_regset_sections): New.
(i386obsd_aout_init_abi): Adjust gdbarch initialization.
* configure.tgt (gdb_target_obs): Add fbsd-tdep.o for all x86 FreeBSD
targets.
* amd64fbsd-tdep.c (fbsd-tdep.h): Include.
(amd64fbsd_init_abi): Call fbsd_init_abi.
* i386fbsd-tdep.c (fbsd-tdep.h): Include.
(i386fbsd4_init_abi): Call fbsd_init_abi.
* amd64fbsd-nat.c (_initialize_amd64fbsd_nat): No longer set
target method 'make_corefile_notes'.
* i386fbsd-nat.c (_initialize_i386fbsd_nat): Likewise.
Diffstat (limited to 'gdb/i386obsd-tdep.c')
-rw-r--r-- | gdb/i386obsd-tdep.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c index 2b7d48b..1fd414f 100644 --- a/gdb/i386obsd-tdep.c +++ b/gdb/i386obsd-tdep.c @@ -154,21 +154,19 @@ static const struct regset i386obsd_aout_gregset = NULL, i386obsd_aout_supply_regset, NULL }; -static const struct regset * -i386obsd_aout_regset_from_core_section (struct gdbarch *gdbarch, - const char *sect_name, - size_t sect_size) +static void +i386obsd_aout_iterate_over_regset_sections (struct gdbarch *gdbarch, + iterate_over_regset_sections_cb *cb, + void *cb_data, + const struct regcache *regcache) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); /* OpenBSD a.out core dumps don't use seperate register sets for the general-purpose and floating-point registers. */ - if (strcmp (sect_name, ".reg") == 0 - && sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE) - return &i386obsd_aout_gregset; - - return NULL; + cb (".reg", tdep->sizeof_gregset + I387_SIZEOF_FSAVE, + &i386obsd_aout_gregset, NULL, cb_data); } @@ -482,8 +480,8 @@ i386obsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) i386obsd_init_abi (info, gdbarch); /* OpenBSD a.out has a single register set. */ - set_gdbarch_regset_from_core_section - (gdbarch, i386obsd_aout_regset_from_core_section); + set_gdbarch_iterate_over_regset_sections + (gdbarch, i386obsd_aout_iterate_over_regset_sections); } /* OpenBSD ELF. */ |