aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-10-01 20:36:56 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-10-01 20:36:56 +0000
commitcf50a87ae23017c5f38251e8487e9dbf7c009119 (patch)
tree28f81de21146e9aba6d5538214f19a7984e4ee93
parentd17e7bce1eb77c855917a6fb06433382883a623d (diff)
downloadgdb-cf50a87ae23017c5f38251e8487e9dbf7c009119.zip
gdb-cf50a87ae23017c5f38251e8487e9dbf7c009119.tar.gz
gdb-cf50a87ae23017c5f38251e8487e9dbf7c009119.tar.bz2
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.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/linux-proc.c24
2 files changed, 28 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 910bd3f..adba703 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/gdb/linux-proc.c b/gdb/linux-proc.c
index 2f290c4..22dc93d 100644
--- a/gdb/linux-proc.c
+++ b/gdb/linux-proc.c
@@ -235,6 +235,26 @@ linux_corefile_thread_callback (struct lwp_info *ti, void *data)
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.
@@ -277,8 +297,8 @@ linux_make_note_section (bfd *obfd, int *note_size)
{
/* 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
{