diff --git a/gdb/ChangeLog b/gdb/ChangeLog index eb8ef879a3..d984565e3f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-03-16 John Baldwin + + * fbsd-tdep.c (fbsd_make_corefile_notes): Fetch all target registers + before writing core register notes. + 2015-03-16 Yuanhui Zhang Pedro Alves diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c index 5d17f03cac..9609cd8f8e 100644 --- a/gdb/fbsd-tdep.c +++ b/gdb/fbsd-tdep.c @@ -89,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; @@ -104,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);