2014-05-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
+ * mn10300-linux-tdep.c (am33_gregset, am33_fpregset): New static
+ regset structures.
+ (am33_regset_from_core_section): Remove dynamic regset
+ allocations.
+
+2014-05-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
* mips-linux-tdep.c (mips_linux_gregset, mips64_linux_gregset)
(mips_linux_fpregset, mips64_linux_fpregset): New static regset
structures.
return;
}
+static const struct regset am33_gregset =
+ {
+ NULL, am33_supply_gregset_method, am33_collect_gregset_method
+ };
+
+static const struct regset am33_fpregset =
+ {
+ NULL, am33_supply_fpregset_method, am33_collect_fpregset_method
+ };
+
/* Create a struct regset from a corefile register section. */
static const struct regset *
const char *sect_name,
size_t sect_size)
{
- /* We will call regset_alloc, and pass the names of the supply and
- collect methods. */
-
if (sect_size == sizeof (mn10300_elf_fpregset_t))
- return regset_alloc (gdbarch,
- am33_supply_fpregset_method,
- am33_collect_fpregset_method);
+ return &am33_fpregset;
else
- return regset_alloc (gdbarch,
- am33_supply_gregset_method,
- am33_collect_gregset_method);
+ return &am33_gregset;
}
\f
static void