Use 'ptid_t' instead of 'ptid' for fbsd_next_vfork_done's return type.
[deliverable/binutils-gdb.git] / gdb / mips64obsd-tdep.c
index 8a89af1d9e46ddb0cdce2deb34d16d4332c73d24..df8ec0f8dd8cd94226d77ad42bb25f0bc68f8449 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for OpenBSD/mips64.
 
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
+   Copyright (C) 2004-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,8 +25,6 @@
 #include "trad-frame.h"
 #include "tramp-frame.h"
 
-#include <string.h>
-
 #include "obsd-tdep.h"
 #include "mips-tdep.h"
 #include "solib-svr4.h"
@@ -48,7 +46,7 @@ mips64obsd_supply_gregset (const struct regset *regset,
                           struct regcache *regcache, int regnum,
                           const void *gregs, size_t len)
 {
-  const char *regs = gregs;
+  const char *regs = (const char *) gregs;
   int i;
 
   for (i = 0; i < MIPS64OBSD_NUM_REGS; i++)
@@ -66,17 +64,15 @@ static const struct regset mips64obsd_gregset =
   mips64obsd_supply_gregset
 };
 
-/* Return the appropriate register set for the core section identified
-   by SECT_NAME and SECT_SIZE.  */
+/* Iterate over core file register note sections.  */
 
-static const struct regset *
-mips64obsd_regset_from_core_section (struct gdbarch *gdbarch,
-                                    const char *sect_name, size_t sect_size)
+static void
+mips64obsd_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 >= MIPS64OBSD_NUM_REGS * 8)
-    return &mips64obsd_gregset;
-
-  return NULL;
+  cb (".reg", MIPS64OBSD_NUM_REGS * 8, &mips64obsd_gregset, NULL, cb_data);
 }
 \f
 
@@ -147,8 +143,8 @@ mips64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   /* OpenBSD/mips64 only supports the n64 ABI, but the braindamaged
      way GDB works, forces us to pretend we can handle them all.  */
 
-  set_gdbarch_regset_from_core_section
-    (gdbarch, mips64obsd_regset_from_core_section);
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, mips64obsd_iterate_over_regset_sections);
 
   tramp_frame_prepend_unwinder (gdbarch, &mips64obsd_sigframe);
 
This page took 0.027302 seconds and 4 git commands to generate.