public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH master/7.12] PR 20627: Use resume_stop to stop lwp
@ 2016-09-29  1:52 Yao Qi
  2016-09-29  2:44 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2016-09-29  1:52 UTC (permalink / raw)
  To: gdb-patches

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-28  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.
---
 gdb/gdbserver/target.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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);
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH master/7.12] PR 20627: Use resume_stop to stop lwp
  2016-09-29  1:52 [PATCH master/7.12] PR 20627: Use resume_stop to stop lwp Yao Qi
@ 2016-09-29  2:44 ` Pedro Alves
  2016-09-30 18:00   ` Yao Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2016-09-29  2:44 UTC (permalink / raw)
  To: Yao Qi, gdb-patches

On 09/28/2016 07:30 PM, Yao Qi wrote:
> 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-28  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.

OK.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH master/7.12] PR 20627: Use resume_stop to stop lwp
  2016-09-29  2:44 ` Pedro Alves
@ 2016-09-30 18:00   ` Yao Qi
  0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2016-09-30 18:00 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

On Thu, Sep 29, 2016 at 2:52 AM, Pedro Alves <palves@redhat.com> wrote:
> On 09/28/2016 07:30 PM, Yao Qi wrote:
>> 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,

>
> OK.
>

Patch is pushed in to master.  Commit 049a8570 is not merged to 7.12 branch, so
the bug is only master.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-30 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29  1:52 [PATCH master/7.12] PR 20627: Use resume_stop to stop lwp Yao Qi
2016-09-29  2:44 ` Pedro Alves
2016-09-30 18:00   ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).