From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: don't pass TARGET_WNOHANG to targets that can't async (PR 26642)
Date: Tue, 13 Oct 2020 16:21:18 +0100 [thread overview]
Message-ID: <9ce07de9-7945-bc5c-e49d-700062e44e2a@palves.net> (raw)
In-Reply-To: <518fc763-c94d-c987-0bc8-0be3c2e3a6f6@polymtl.ca>
On 10/13/20 4:06 PM, Simon Marchi wrote:
> On 2020-10-12 10:48 a.m., Pedro Alves wrote:
>> I'd rather go without this hunk. Would it still fix things?
>
> Yes, since infrun won't ask linux-nat to TARGET_WNOHANG when
> target_async_permitted is false. I'll remove it, since it can never
> happen with the assert in target_wait. If anything, we could put an
> assert here as a double-check, if you think it could help.
I don't think it could help.
> I'll send a v2 shortly.
>
> I was wondering, do you see a better way to fix this than what I did in
> do_target_wait_1, forcing TARGET_WNOHANG to off? It doesn't feel right
> to have the caller ask for something and just do something else. But I
> couldn't think of anything better (that's also suitable for the release
> branch, at least).
I don't -- you can't do it at the caller because there you don't know
which inferior/target will be called.
We could just change the semantics of the do_target_wait slightly, like:
static bool
do_target_wait (ptid_t wait_ptid, execution_control_state *ecs,
- target_wait_flags options)
+ bool dont_block_if_possible)
{
That doesn't seem that much better to me, though.
next prev parent reply other threads:[~2020-10-13 15:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 2:56 Simon Marchi via Gdb-patches
2020-10-12 14:48 ` Pedro Alves
2020-10-13 15:06 ` Simon Marchi via Gdb-patches
2020-10-13 15:21 ` Pedro Alves [this message]
2020-10-13 15:27 ` Simon Marchi via Gdb-patches
2020-10-13 15:31 ` [PATCH v2] " Simon Marchi via Gdb-patches
2020-10-13 15:44 ` Pedro Alves
2020-10-13 16:00 ` 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=9ce07de9-7945-bc5c-e49d-700062e44e2a@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--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