/* 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.
#include "regset.h"
#include "gdbthread.h"
-#include "gdb_assert.h"
-#include <string.h>
-
#include "elf-bfd.h"
#include "fbsd-tdep.h"
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;
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);