From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 678BF386103C for ; Tue, 13 Oct 2020 16:01:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 678BF386103C Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 09DG0lph029829 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Oct 2020 12:00:52 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 09DG0lph029829 Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 416541E58D; Tue, 13 Oct 2020 12:00:47 -0400 (EDT) Subject: Re: [PATCH v2] gdb: don't pass TARGET_WNOHANG to targets that can't async (PR 26642) To: Pedro Alves , gdb-patches@sourceware.org References: <20201001025656.2561757-1-simon.marchi@polymtl.ca> <20201013152705.36523-1-simon.marchi@polymtl.ca> <5ede20ac-5b58-5693-eeb2-bf61095d078d@palves.net> From: Simon Marchi Message-ID: <182da68e-b011-491f-4f63-00eb60cfff88@polymtl.ca> Date: Tue, 13 Oct 2020 12:00:46 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <5ede20ac-5b58-5693-eeb2-bf61095d078d@palves.net> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 13 Oct 2020 16:00:47 +0000 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-DCC: x.dcc-servers: antispam2020.polymtl.ca 104; Body=1 Fuz1=1 Fuz2=1 X-Spam-Languages: en X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2020 16:01:04 -0000 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