record-full/record-btrace: software/hardware breakpoint trap
[deliverable/binutils-gdb.git] / gdb / m88k-tdep.c
index c4c3266914d2c9b8af0dc95e3c1a374cfb993dea..57754672917929a60d4c851f302d8c21fb59c52e 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Motorola 88000 series.
 
-   Copyright (C) 2004-2005, 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2004-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,9 +31,6 @@
 #include "trad-frame.h"
 #include "value.h"
 
-#include "gdb_assert.h"
-#include "gdb_string.h"
-
 #include "m88k-tdep.h"
 
 /* Fetch the instruction at PC.  */
@@ -799,23 +796,21 @@ m88k_supply_gregset (const struct regset *regset,
 
 /* Motorola 88000 register set.  */
 
-static struct regset m88k_gregset =
+static const struct regset m88k_gregset =
 {
   NULL,
   m88k_supply_gregset
 };
 
-/* Return the appropriate register set for the core section identified
-   by SECT_NAME and SECT_SIZE.  */
+/* Iterate over supported core file register note sections. */
 
-static const struct regset *
-m88k_regset_from_core_section (struct gdbarch *gdbarch,
-                              const char *sect_name, size_t sect_size)
+static void
+m88k_iterate_over_regset_sections (struct gdbarch *gdbarch,
+                                  iterate_over_regset_sections_cb *cb,
+                                  void *cb_data,
+                                  const struct regcache *regcache)
 {
-  if (strcmp (sect_name, ".reg") == 0 && sect_size >= M88K_NUM_REGS * 4)
-    return &m88k_gregset;
-
-  return NULL;
+  cb (".reg", M88K_NUM_REGS * 4, &m88k_gregset, NULL, cb_data);
 }
 \f
 
@@ -845,8 +840,8 @@ m88k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_pc_regnum (gdbarch, M88K_SXIP_REGNUM);
 
   /* Core file support.  */
-  set_gdbarch_regset_from_core_section
-    (gdbarch, m88k_regset_from_core_section);
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, m88k_iterate_over_regset_sections);
 
   set_gdbarch_print_insn (gdbarch, print_insn_m88k);
 
This page took 0.03209 seconds and 4 git commands to generate.