+/* Callback for get_core_registers that handles a single core file
+ register note section. */
+
+static void
+get_core_registers_cb (const char *sect_name, int size,
+ const struct regset *regset,
+ const char *human_name, void *cb_data)
+{
+ struct regcache *regcache = (struct regcache *) cb_data;
+ int required = 0;
+
+ if (strcmp (sect_name, ".reg") == 0)
+ {
+ required = 1;
+ if (human_name == NULL)
+ human_name = "general-purpose";
+ }
+ else if (strcmp (sect_name, ".reg2") == 0)
+ {
+ if (human_name == NULL)
+ human_name = "floating-point";
+ }
+
+ /* The 'which' parameter is only used when no regset is provided.
+ Thus we just set it to -1. */
+ get_core_register_section (regcache, regset, sect_name,
+ size, -1, human_name, required);
+}