From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>,
GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Use "switch_to_thread" more thoroughly on gdbserver
Date: Fri, 15 Sep 2017 11:14:00 -0000 [thread overview]
Message-ID: <6f36073a-eed8-123d-94ec-8922aa0aa648@redhat.com> (raw)
In-Reply-To: <20170915043357.26094-1-sergiodj@redhat.com>
On 09/15/2017 05:33 AM, Sergio Durigan Junior wrote:
> diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c
> index 752646310a..2226dc802d 100644
> --- a/gdb/gdbserver/target.c
> +++ b/gdb/gdbserver/target.c
> @@ -26,14 +26,11 @@ struct target_ops *the_target;
> int
> set_desired_thread (int use_general)
> {
> - struct thread_info *found;
> -
> if (use_general == 1)
> - found = find_thread_ptid (general_thread);
> + switch_to_thread (general_thread);
> else
> - found = find_thread_ptid (cont_thread);
> + switch_to_thread (cont_thread);
>
> - current_thread = found;
> return (current_thread != NULL);
Did you double-check whether this is equivalent? Off hand, I'd
think it is, but the minus_one_ptid check in switch_to_thread
gave me pause. there's a 'set_continue_thread (minus_one_ptid)' in
gdb in early connection setup. Looks like we never call
'set_desired_thread(0)' nowadays though. [Hc predates vCont].
Do you remember why that check is there in switch_to_thread in the
first place, as opposed to, say, an assertion?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-09-15 11:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 4:34 Sergio Durigan Junior
2017-09-15 11:14 ` Pedro Alves [this message]
2017-09-15 18:25 ` Sergio Durigan Junior
2017-09-21 15:11 ` Pedro Alves
2017-09-21 15:42 ` Sergio Durigan Junior
2017-09-26 4:23 ` [PATCH v2] " Sergio Durigan Junior
2017-09-26 12:28 ` Pedro Alves
2017-09-26 16:52 ` Sergio Durigan Junior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6f36073a-eed8-123d-94ec-8922aa0aa648@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox