diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-09-30 18:39:12 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-09-30 18:39:12 +0100 |
commit | 17e16485989c7e91ba1ec5abf397f7f91a299eec (patch) | |
tree | 1310e0bfa5f138a45ce2ecca2f520af08079aed7 | |
parent | 72da393d4131836933f104abf0f605e09970f134 (diff) | |
download | gdb-17e16485989c7e91ba1ec5abf397f7f91a299eec.zip gdb-17e16485989c7e91ba1ec5abf397f7f91a299eec.tar.gz gdb-17e16485989c7e91ba1ec5abf397f7f91a299eec.tar.bz2 |
PR 20627: Use resume_stop to stop lwp
Commit 049a8570 (Use target_continue{,_no_signal} instead of target_resume)
replaces the code stopping lwp with target_continue_no_signal in
target_stop_and_wait, like this,
- resume_info.thread = ptid;
- resume_info.kind = resume_stop;
- resume_info.sig = GDB_SIGNAL_0;
- (*the_target->resume) (&resume_info, 1);
+ target_continue_no_signal (ptid);
the replacement is not equivalent, and it causes PR 20627. This patch
is just to revert that change.
Regression testing it on x86_64-linux.
gdb/gdbserver:
2016-09-30 Yao Qi <yao.qi@linaro.org>
PR gdbserver/20627
* target.c (target_stop_and_wait): Don't call
target_continue_no_signal, use resume_stop instead.
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/target.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index aace877..5c2cca9 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2016-09-30 Yao Qi <yao.qi@linaro.org> + + PR gdbserver/20627 + * target.c (target_stop_and_wait): Don't call + target_continue_no_signal, use resume_stop instead. + 2016-09-26 Yao Qi <yao.qi@linaro.org> * linux-low.c (linux_wait_1): Call debug_exit. diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c index cf3da47..fd7c714 100644 --- a/gdb/gdbserver/target.c +++ b/gdb/gdbserver/target.c @@ -248,8 +248,12 @@ target_stop_and_wait (ptid_t ptid) { struct target_waitstatus status; int was_non_stop = non_stop; + struct thread_resume resume_info; - target_continue_no_signal (ptid); + resume_info.thread = ptid; + resume_info.kind = resume_stop; + resume_info.sig = GDB_SIGNAL_0; + (*the_target->resume) (&resume_info, 1); non_stop = 1; mywait (ptid, &status, 0, 0); |