From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2] Use "switch_to_thread" more thoroughly on gdbserver
Date: Tue, 26 Sep 2017 16:52:00 -0000 [thread overview]
Message-ID: <87ing5iert.fsf@redhat.com> (raw)
In-Reply-To: <ad4dd6c5-ce85-d216-3fcb-23b0e7b80576@redhat.com> (Pedro Alves's message of "Tue, 26 Sep 2017 13:28:26 +0100")
On Tuesday, September 26 2017, Pedro Alves wrote:
> On 09/26/2017 05:22 AM, Sergio Durigan Junior wrote:
>
>> gdb/gdbserver/ChangeLog:
>> yyyy-mm-dd Sergio Durigan Junior <sergiodj@redhat.com>
>>
>> * gdbthread.h: Include "common-gdbthread.h".
>> * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
>> "if" when validating the ptid.
>> * remote-utils.c: Include "gdbthread.h".
>> (prepare_resume_reply): Use "switch_to_thread".
>> * target.c (done_accessing_memory): Likewise.
>
> OK
>
>> void
>> switch_to_thread (ptid_t ptid)
>> {
>> - if (!ptid_equal (ptid, minus_one_ptid))
>> - current_thread = find_thread_ptid (ptid);
>> + gdb_assert (!ptid_equal (ptid, minus_one_ptid));
>
> Note you can write:
>
> gdb_assert (ptid != minus_one_ptid);
>
> nowadays.
That's right; pushed with this small nit fixed.
75352e283fb2b265d14c750859156943f6eb2693
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
prev parent reply other threads:[~2017-09-26 16:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 4:34 [PATCH] " Sergio Durigan Junior
2017-09-15 11:14 ` Pedro Alves
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 [this message]
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=87ing5iert.fsf@redhat.com \
--to=sergiodj@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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