Fix shared library load in gdb.base/global-var-nested-by-dso.exp.
[deliverable/binutils-gdb.git] / gdb / fbsd-tdep.c
index a60fbc24f8f1e54057fdf38b0b8cd7a46fd9e22b..9609cd8f8e4f73e81f3f313c88db5e7e31673c94 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for FreeBSD, architecture-independent.
 
-   Copyright (C) 2002-2014 Free Software Foundation, Inc.
+   Copyright (C) 2002-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,9 +24,6 @@
 #include "regset.h"
 #include "gdbthread.h"
 
-#include "gdb_assert.h"
-#include <string.h>
-
 #include "elf-bfd.h"
 #include "fbsd-tdep.h"
 
@@ -92,7 +89,7 @@ fbsd_collect_regset_section_cb (const char *sect_name, int size,
 static char *
 fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
 {
-  const struct regcache *regcache = get_current_regcache ();
+  struct regcache *regcache = get_current_regcache ();
   char *note_data;
   Elf_Internal_Ehdr *i_ehdrp;
   struct fbsd_collect_regset_section_cb_data data;
@@ -107,6 +104,7 @@ fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
   data.obfd = obfd;
   data.note_data = NULL;
   data.note_size = note_size;
+  target_fetch_registers (regcache, -1);
   gdbarch_iterate_over_regset_sections (gdbarch,
                                        fbsd_collect_regset_section_cb,
                                        &data, regcache);
This page took 0.025207 seconds and 4 git commands to generate.