From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb: don't pass TARGET_WNOHANG to targets that can't async (PR 26642)
Date: Tue, 13 Oct 2020 12:00:46 -0400 [thread overview]
Message-ID: <182da68e-b011-491f-4f63-00eb60cfff88@polymtl.ca> (raw)
In-Reply-To: <5ede20ac-5b58-5693-eeb2-bf61095d078d@palves.net>
On 2020-10-13 11:44 a.m., Pedro Alves wrote:
> On 10/13/20 4:31 PM, Simon Marchi via Gdb-patches wrote:
>
>>> +standard_testfile
>>> +
>>> +save_vars { GDBFLAGS } {
>>> + # Enable target-async off this way, because with board
>>> + # native-extended-gdbserver, the remote target is already open when
>>> + # returning from prepare_for_testing, and that would be too late to toggle
>>> + # it.
>>> + append GDBFLAGS { -ex "maintenance set target-async off" }
>>> +
>>> + if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
>>> + return
>>> + }
>>> +
>>> + # Make sure our command-line flag worked.
>>> + gdb_test "maintenance show target-async" "Controlling the inferior in asynchronous mode is off\\."
>>> +
>>> + if { ![runto_main] } {
>>> + fail "can't run to main"
>>> + return
>>> + }
>>> +
>>> + gdb_continue_to_end
>>> +}
>
> Note the save_vars scope only needs to be around prepare_for_testing.
Ok, I changed it to avoid unnecessary indentation for the rest of the test.
> Anyway, LGTM.
Thanks, I'll push with that change.
Simon
prev parent reply other threads:[~2020-10-13 16:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 2:56 [PATCH] " 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
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 [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=182da68e-b011-491f-4f63-00eb60cfff88@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
--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