TILEGX: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Fri, 29 Nov 2013 17:05:44 +0000 (17:05 +0000)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Tue, 30 Sep 2014 07:14:38 +0000 (09:14 +0200)
For TILE-Gx GNU/Linux targets, no longer define the gdbarch method
'regset_from_core_section', but the iterator method instead.

gdb/ChangeLog:

* tilegx-linux-tdep.c (TILEGX_LINUX_SIZEOF_GREGSET): New macro.
(tilegx_regset_from_core_section): Remove.
(tilegx_iterate_over_regset_sections): New.
(tilegx_linux_init_abi): Adjust gdbarch initialization.

gdb/ChangeLog
gdb/tilegx-linux-tdep.c

index 77abe1beb874ab32e069dd72d9e4daf176cd1726..97814d0b68c32e8b2d0a75bd4368d4698574de5d 100644 (file)
@@ -1,3 +1,10 @@
+2014-09-30  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+       * tilegx-linux-tdep.c (TILEGX_LINUX_SIZEOF_GREGSET): New macro.
+       (tilegx_regset_from_core_section): Remove.
+       (tilegx_iterate_over_regset_sections): New.
+       (tilegx_linux_init_abi): Adjust gdbarch initialization.
+
 2014-09-30  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
        * sparc-tdep.c (sparc_regset_from_core_section): Remove.
index 184d00cf42c173f7bfc95cc0f2d9a777569b8a65..829a09bfa360f97e0b96144aacf51d9807a923ec 100644 (file)
@@ -83,6 +83,8 @@ static const struct regcache_map_entry tilegx_linux_regmap[] =
     { 0 }
   };
 
+#define TILEGX_LINUX_SIZEOF_GREGSET (64 * 8)
+
 /* TILE-Gx Linux kernel register set.  */
 
 static const struct regset tilegx_linux_regset =
@@ -91,15 +93,15 @@ static const struct regset tilegx_linux_regset =
   regcache_supply_regset, regcache_collect_regset
 };
 
-static const struct regset *
-tilegx_regset_from_core_section (struct gdbarch *gdbarch,
-                                const char *sect_name,
-                                size_t sect_size)
-{
-  if (strcmp (sect_name, ".reg") == 0)
-    return &tilegx_linux_regset;
 
-  return NULL;
+static void
+tilegx_iterate_over_regset_sections (struct gdbarch *gdbarch,
+                                    iterate_over_regset_sections_cb *cb,
+                                    void *cb_data,
+                                    const struct regcache *regcache)
+{
+  cb (".reg", TILEGX_LINUX_SIZEOF_GREGSET, &tilegx_linux_regset,
+      NULL, cb_data);
 }
 
 /* OS specific initialization of gdbarch.  */
@@ -113,8 +115,8 @@ tilegx_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   tramp_frame_prepend_unwinder (gdbarch, &tilegx_linux_rt_sigframe);
 
-  set_gdbarch_regset_from_core_section (gdbarch,
-                                       tilegx_regset_from_core_section);
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, tilegx_iterate_over_regset_sections);
 
   /* GNU/Linux uses SVR4-style shared libraries.  */
   if (arch_size == 32)
This page took 0.029318 seconds and 4 git commands to generate.