diff options
author | Doug Evans <dje@google.com> | 2014-02-05 16:08:59 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-02-05 16:08:59 -0800 |
commit | ee1e2d4fb692736c754b42b69eb88c1f436c5f15 (patch) | |
tree | 1a7c8c3e8bfc2fb43eae98c56f589de4f5289817 /gdb/gdbserver | |
parent | 2e200ee30253b01cd2e8f0f2b6e89e2b95c0d568 (diff) | |
download | gdb-ee1e2d4fb692736c754b42b69eb88c1f436c5f15.zip gdb-ee1e2d4fb692736c754b42b69eb88c1f436c5f15.tar.gz gdb-ee1e2d4fb692736c754b42b69eb88c1f436c5f15.tar.bz2 |
Keep current_inferior in sync with event_child.
* linux-low.c (linux_wait_for_event): Improve comment.
(linux_wait_1): Keep current_inferior in sync with event_child.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 2e53986..53c2acc 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2014-02-05 Doug Evans <dje@google.com> + + * linux-low.c (linux_wait_for_event): Improve comment. + (linux_wait_1): Keep current_inferior in sync with event_child. + 2014-01-22 Doug Evans <dje@google.com> * gdbthread.h (gdb_id_to_thread): Delete, unused. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index bac6134..c72d681 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -1756,7 +1756,7 @@ ptid_t step_over_bkpt; child. Store the stop status through the status pointer WSTAT. OPTIONS is passed to the waitpid call. Return 0 if no child stop event was found and OPTIONS contains WNOHANG. Return the PID of - the stopped child otherwise. */ + the stopped child and update current_inferior otherwise. */ static int linux_wait_for_event (ptid_t ptid, int *wstat, int options) @@ -2681,6 +2681,9 @@ retry: select_event_lwp (&event_child); + /* current_inferior and event_child must stay in sync. */ + current_inferior = get_lwp_thread (event_child); + event_child->status_pending_p = 0; w = event_child->status_pending; } |