+2003-09-24 Elena Zannoni <ezannoni@redhat.com>
+
+ * linux-proc.c (linux_do_registers): New function.
+ (linux_make_note_section): Use linux_do_registers in case of
+ single threaded inferior programs.
+
2003-10-01 Andrew Cagney <cagney@redhat.com>
* infcall.c (call_function_by_hand): When STRUCT_RETURN, always
return 0;
}
+/* Function: linux_do_registers
+ *
+ * Records the register state for the corefile note section.
+ */
+
+static char *
+linux_do_registers (bfd *obfd, ptid_t ptid,
+ char *note_data, int *note_size)
+{
+ registers_changed ();
+ target_fetch_registers (-1); /* FIXME should not be necessary;
+ fill_gregset should do it automatically. */
+ return linux_do_thread_registers (obfd,
+ ptid_build (ptid_get_pid (inferior_ptid),
+ ptid_get_pid (inferior_ptid),
+ 0),
+ note_data, note_size);
+ return note_data;
+}
+
/* Function: linux_make_note_section
*
* Fills the "to_make_corefile_note" target vector.
{
/* iterate_over_threads didn't come up with any threads;
just use inferior_ptid. */
- note_data = linux_do_thread_registers (obfd, inferior_ptid,
- note_data, note_size);
+ note_data = linux_do_registers (obfd, inferior_ptid,
+ note_data, note_size);
}
else
{