X86: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'
[deliverable/binutils-gdb.git] / gdb / amd64obsd-tdep.c
index ef0c0c2f8534e7b72e7b58f882619b8e1d19a667..80300c8d2a8f355e49ced9420ca147d93e61239e 100644 (file)
@@ -57,20 +57,19 @@ static const struct regset amd64obsd_combined_regset =
     NULL, amd64obsd_supply_regset, NULL
   };
 
-static const struct regset *
-amd64obsd_regset_from_core_section (struct gdbarch *gdbarch,
-                                   const char *sect_name, size_t sect_size)
+static void
+amd64obsd_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 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_FXSAVE)
-    return &amd64obsd_combined_regset;
-
-  return NULL;
+  cb (".reg", tdep->sizeof_gregset + I387_SIZEOF_FXSAVE,
+      &amd64obsd_combined_regset, NULL, cb_data);
 }
 \f
 
@@ -492,8 +491,8 @@ amd64obsd_core_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   amd64obsd_init_abi (info, gdbarch);
 
-  set_gdbarch_regset_from_core_section
-    (gdbarch, amd64obsd_regset_from_core_section);
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, amd64obsd_iterate_over_regset_sections);
 }
 \f
 
This page took 0.025486 seconds and 4 git commands to generate.