From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8rhqFOk6bWO9nBYAWB0awg (envelope-from ) for ; Thu, 10 Nov 2022 12:54:49 -0500 Received: by simark.ca (Postfix, from userid 112) id 47AF81E124; Thu, 10 Nov 2022 12:54:49 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=F2ISir6F; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 016AB1E0CB for ; Thu, 10 Nov 2022 12:54:49 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7FA103858431 for ; Thu, 10 Nov 2022 17:54:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FA103858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668102888; bh=orO7m1gwvsjvMweI8FkRfV+EJB9SFUuh5Wk3CF5USOg=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=F2ISir6F+YWVn6iA32MYSeUwp3v9nHzxc24h6Uwl6dbBxpmfFsYTdT+o05QrzfPSs C6yQjs+a9k2ry796xe0j3CV6Y14n/MhiGRhY4aPnYkdFrY0vBvsr+EcRXDaK0QjsJl k/w/cf6PbSBg3aiZ5LPBQ4nYnd+eGJ/5Txq5gqNg= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 289613858298 for ; Thu, 10 Nov 2022 17:53:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 289613858298 Received: from [10.0.0.11] (unknown [217.28.27.60]) (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 952D31E0CB; Thu, 10 Nov 2022 12:53:48 -0500 (EST) Message-ID: <24950a15-f7c9-5da7-734c-51e11b6b2089@simark.ca> Date: Thu, 10 Nov 2022 12:53:47 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v2] gdb: make "start" breakpoint inferior-specific Content-Language: en-US To: Pedro Alves , Simon Marchi , gdb-patches@sourceware.org References: <691c5a58-68ae-5fe9-2f3d-34fb7af69ad0@palves.net> <20221108212008.1792090-1-simon.marchi@efficios.com> <47b696c4-6584-8165-0799-5d742132361a@palves.net> <0ebeeb02-db83-53ac-2bcb-05dc92b96316@simark.ca> <1fe7e127-e23a-5563-68e8-47c13f14679e@palves.net> In-Reply-To: <1fe7e127-e23a-5563-68e8-47c13f14679e@palves.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 11/10/22 12:47, Pedro Alves wrote: > On 2022-11-10 5:33 p.m., Simon Marchi wrote: > >>>> +proc do_test {} { >>>> + # With remote, to be able to start an inferior while another one is >>>> + # running, we need to use the non-stop variant of the protocol. >>>> + save_vars { ::GDBFLAGS } { >>>> + if { [target_info gdb_protocol] == "extended-remote"} { >>>> + append ::GDBFLAGS " -ex \"maintenance set target-non-stop on\"" >>>> + } >>>> + >>>> + clean_restart ${::binfile_other} >>>> + } >>>> + >>>> + gdb_test "run&" "Starting program: .*" "start background inferior" >>> >>> I was going to point out that if the inferior prints something, this can >>> timeout, as that output would appear after the prompt. I then looked around >>> the tree for "run&" uses, to confirm we are using gdb_test_multiple with that, >>> and found that you just recently added "gdb_test -no-prompt-anchor", for exactly >>> this scenario. :-) I think that should be used here. >> >> Even if, in this case, we know the inferior won't print anything? > > Admitedly it's a bit pedantic, but it seems to me to be safer. Say > someones adds some logging to the program or something. It just looks > like good practice to me to not have an anchor when the inferior is left > running after the prompt is printed. Ack, I will add it. Simon