From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 5/5] gdb: better handling of 'S' packets
Date: Fri, 8 Jan 2021 14:11:40 -0500 [thread overview]
Message-ID: <d15ba63f-201c-4503-26cd-453a285059c6@polymtl.ca> (raw)
In-Reply-To: <20210108181945.GC2945@embecosm.com>
>> + bool multiple_resumed_thread = false;
>
> This might be better named 'multiple_resumed_threads'. Apologies if
> this was just copied from my original code.
Agreed, fixed.
>>
>> - /* If no thread/process was reported by the stub then use the first
>> - non-exited thread in the current target. */
>> - if (ptid == null_ptid)
>> + /* Consider all non-exited threads of the target, find the first resumed
>> + one. */
>> + for (thread_info *thr : all_non_exited_threads (this))
>> {
>> - /* Some stop events apply to all threads in an inferior, while others
>> - only apply to a single thread. */
>> - bool is_stop_for_all_threads
>> - = (status->kind == TARGET_WAITKIND_EXITED
>> - || status->kind == TARGET_WAITKIND_SIGNALLED);
>> + remote_thread_info *remote_thr =get_remote_thread_info (thr);
>
> Missing space after '='.
Fixed.
>> +/* Called when it is decided that STOP_REPLY holds the info of the
>> + event that is to be returned to the core. This function always
>> + destroys STOP_REPLY. */
>> +
>> +ptid_t
>> +remote_target::process_stop_reply (struct stop_reply *stop_reply,
>> + struct target_waitstatus *status)
>> +{
>> + ptid_t ptid;
>
> Shouldn't this just be inline below?
Fixed.
>> diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.c b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.c
>> new file mode 100644
>> index 000000000000..01f6d3c07ff4
>> --- /dev/null
>> +++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.c
>> @@ -0,0 +1,77 @@
>> +/* This testcase is part of GDB, the GNU debugger.
>> +
>> + Copyright 2020 Free Software Foundation, Inc.
>
> The copyright year will need updating now.
Oh, we now live in the future!
>> diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
>> new file mode 100644
>> index 000000000000..f394ca8ed0c4
>> --- /dev/null
>> +++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
>> @@ -0,0 +1,136 @@
>> +# This testcase is part of GDB, the GNU debugger.
>> +#
>> +# Copyright 2020 Free Software Foundation, Inc.
>
> And again.
Fixed too.
Thanks for the comments. I'll give a bit more time for people to
comment. But at this point, patches 1, 2 and 5 were looked at and
agreed with, so I'll push these eventually at least if nothing else
comes up.
Simon
next prev parent reply other threads:[~2021-01-08 19:11 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 4:17 [PATCH v3 0/5] Reduce back and forth with target when threads have pending statuses + " Simon Marchi via Gdb-patches
2021-01-08 4:17 ` [PATCH v3 1/5] gdb: make the remote target track its own thread resume state Simon Marchi via Gdb-patches
2021-01-08 15:41 ` Pedro Alves
2021-01-08 18:56 ` Simon Marchi via Gdb-patches
2021-01-18 5:16 ` Sebastian Huber
2021-01-18 6:04 ` Simon Marchi via Gdb-patches
2021-01-18 10:36 ` Sebastian Huber
2021-01-18 13:53 ` Simon Marchi via Gdb-patches
2021-01-08 4:17 ` [PATCH v3 2/5] gdb: remove target_ops::commit_resume implementation in record-{btrace, full}.c Simon Marchi via Gdb-patches
2021-01-08 15:43 ` [PATCH v3 2/5] gdb: remove target_ops::commit_resume implementation in record-{btrace,full}.c Pedro Alves
2021-01-08 19:00 ` Simon Marchi via Gdb-patches
2021-01-08 4:17 ` [PATCH v3 3/5] gdb: move commit_resume to process_stratum_target Simon Marchi via Gdb-patches
2021-01-08 18:12 ` Andrew Burgess
2021-01-08 19:01 ` Simon Marchi via Gdb-patches
2021-01-09 20:29 ` Pedro Alves
2021-01-08 4:17 ` [PATCH v3 4/5] gdb: generalize commit_resume, avoid commit-resuming when threads have pending statuses Simon Marchi via Gdb-patches
2021-01-08 18:34 ` Andrew Burgess
2021-01-08 19:04 ` Simon Marchi via Gdb-patches
2021-01-09 20:34 ` Pedro Alves
2021-01-11 20:28 ` Simon Marchi via Gdb-patches
2021-01-22 2:46 ` Simon Marchi via Gdb-patches
2021-01-22 22:07 ` Simon Marchi via Gdb-patches
2021-01-12 17:14 ` Simon Marchi via Gdb-patches
2021-01-12 18:04 ` Simon Marchi via Gdb-patches
2021-01-15 19:17 ` Simon Marchi via Gdb-patches
2021-01-08 4:17 ` [PATCH v3 5/5] gdb: better handling of 'S' packets Simon Marchi via Gdb-patches
2021-01-08 18:19 ` Andrew Burgess
2021-01-08 19:11 ` Simon Marchi via Gdb-patches [this message]
2021-01-09 21:26 ` Pedro Alves
2021-01-11 20:36 ` Simon Marchi via Gdb-patches
2021-01-12 3:07 ` Simon Marchi via Gdb-patches
2021-01-13 20:17 ` Pedro Alves
2021-01-14 1:28 ` Simon Marchi via Gdb-patches
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=d15ba63f-201c-4503-26cd-453a285059c6@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=andrew.burgess@embecosm.com \
--cc=simon.marchi@polymtl.ca \
/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