From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NVqbHkbPhV8KDQAAWB0awg (envelope-from ) for ; Tue, 13 Oct 2020 12:01:10 -0400 Received: by simark.ca (Postfix, from userid 112) id 707971EF6F; Tue, 13 Oct 2020 12:01:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9F4CF1E58D for ; Tue, 13 Oct 2020 12:01:06 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3396A388701A; Tue, 13 Oct 2020 16:01:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3396A388701A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1602604866; bh=YoDXLjYMB7DRRQtEpBc40q2zybLl/cVA9hWuX6yaAqM=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=R7amLbG8Z0HX3c7ozkaPUysScrz1GaLGXlnz83feTY7Fd0f1u8D0B97cMZtWqLBRZ O60nsGfC5Hg6MB6o7tcnbQRGQIMM7AiF+3pv3gF374K7qYXIyFMghYETaMuZ44iHVu cVy0/Vusp3J8uQ7TMilw8dx2YhHk2jjfiWkG0YUc= 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> 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-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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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