+2015-02-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * regset.h (struct regset): Add flags field.
+ (REGSET_VARIABLE_SIZE): New value for a regset's flags field.
+ * corelow.c (get_core_register_section): Add warning if the size
+ exceeds the requested size and the regset does not have the
+ REGSET_VARIABLE_SIZE flag set.
+ * alphanbsd-tdep.c (alphanbsd_gregset): Add REGSET_VARIABLE_SIZE
+ flag.
+ * armbsd-tdep.c (armbsd_gregset): Likewise.
+ * hppa-hpux-tdep.c (hppa_hpux_regset): Likewise.
+ * hppaobsd-tdep.c (hppaobsd_gregset): Likewise.
+ * m68kbsd-tdep.c (m68kbsd_gregset): Likewise.
+ * mipsnbsd-tdep.c (mipsnbsd_gregset): Likewise.
+
2015-02-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
* amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections):
static const struct regset alphanbsd_gregset =
{
NULL,
- alphanbsd_supply_gregset
+ alphanbsd_supply_gregset,
+ NULL,
+ REGSET_VARIABLE_SIZE
};
static const struct regset alphanbsd_fpregset =
static const struct regset armbsd_gregset =
{
NULL,
- armbsd_supply_gregset
+ armbsd_supply_gregset,
+ NULL,
+ REGSET_VARIABLE_SIZE
};
static const struct regset armbsd_fpregset =
warning (_("Section `%s' in core file too small."), section_name);
return;
}
+ if (size != min_size && !(regset->flags & REGSET_VARIABLE_SIZE))
+ {
+ warning (_("Unexpected size of section `%s' in core file."),
+ section_name);
+ }
contents = alloca (size);
if (! bfd_get_section_contents (core_bfd, section, contents,
static const struct regset hppa_hpux_regset =
{
NULL,
- hppa_hpux_supply_save_state
+ hppa_hpux_supply_save_state,
+ NULL,
+ REGSET_VARIABLE_SIZE
};
static void
static const struct regset hppaobsd_gregset =
{
NULL,
- hppaobsd_supply_gregset
+ hppaobsd_supply_gregset,
+ NULL,
+ REGSET_VARIABLE_SIZE
};
static const struct regset hppaobsd_fpregset =
static const struct regset m68kbsd_gregset =
{
NULL,
- m68kbsd_supply_gregset
+ m68kbsd_supply_gregset,
+ NULL,
+ REGSET_VARIABLE_SIZE
};
static const struct regset m68kbsd_fpregset =
static const struct regset mipsnbsd_gregset =
{
NULL,
- mipsnbsd_supply_gregset
+ mipsnbsd_supply_gregset,
+ NULL,
+ REGSET_VARIABLE_SIZE
};
static const struct regset mipsnbsd_fpregset =
/* Function collecting values in a register set from a register cache. */
collect_regset_ftype *collect_regset;
+
+ unsigned flags;
};
+/* Values for a regset's 'flags' field. */
+
+#define REGSET_VARIABLE_SIZE 1 /* Accept a larger regset section size
+ in a core file without warning. */
+
#endif /* regset.h */