From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simon.marchi@polymtl.ca>, 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 16:44:02 +0100 [thread overview]
Message-ID: <5ede20ac-5b58-5693-eeb2-bf61095d078d@palves.net> (raw)
In-Reply-To: <d23098a0-8339-bbf7-bed8-762928b21e00@polymtl.ca>
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.
Anyway, LGTM.
next prev parent reply other threads:[~2020-10-13 15:44 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 [this message]
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=5ede20ac-5b58-5693-eeb2-bf61095d078d@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