aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-03-06 00:11:42 +0000
committerPedro Alves <palves@redhat.com>2010-03-06 00:11:42 +0000
commitbce522a2604ef89eceb4c7b7987a30e3d6c58825 (patch)
tree7fdfc2635d7481e99ff1c16743a2497023942d9e /gdb
parentf9b023f2f6a7600ddbb9935271c3811d015a8812 (diff)
downloadgdb-bce522a2604ef89eceb4c7b7987a30e3d6c58825.zip
gdb-bce522a2604ef89eceb4c7b7987a30e3d6c58825.tar.gz
gdb-bce522a2604ef89eceb4c7b7987a30e3d6c58825.tar.bz2
2010-03-06 Simo Melenius <simo.melenius@iki.fi>
* linux-low.c (linux_wait_for_lwp): Fetch the regcache after switching the current inferior, not before.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/linux-low.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 4fae9cc..27af34e 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-06 Simo Melenius <simo.melenius@iki.fi>
+
+ * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
+ switching the current inferior, not before.
+
2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 262a1df..6499ca7 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -1067,11 +1067,12 @@ retry:
&& the_low_target.get_pc != NULL)
{
struct thread_info *saved_inferior = current_inferior;
- struct regcache *regcache = get_thread_regcache (current_inferior, 1);
+ struct regcache *regcache;
CORE_ADDR pc;
current_inferior = (struct thread_info *)
find_inferior_id (&all_threads, child->head.id);
+ regcache = get_thread_regcache (current_inferior, 1);
pc = (*the_low_target.get_pc) (regcache);
fprintf (stderr, "linux_wait_for_lwp: pc is 0x%lx\n", (long) pc);
current_inferior = saved_inferior;