From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2WFPG1kiQ2hzfwMAWB0awg (envelope-from ) for ; Fri, 06 Jun 2025 13:16:09 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Ap1fXzxd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5B12D1E11C; Fri, 6 Jun 2025 13:16:09 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_SBL_CSS,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E33881E0C2 for ; Fri, 6 Jun 2025 13:16:08 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5742F3858C50 for ; Fri, 6 Jun 2025 17:16:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5742F3858C50 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Ap1fXzxd Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id E1F70385703B for ; Fri, 6 Jun 2025 17:15:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E1F70385703B Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E1F70385703B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749230134; cv=none; b=oCuDT8p4UBuhe7Qw5bQAatb/3WqEjB+TehbeJLNFljwfLZUiV3qJpAbwoqTBYurzYql3MO02Mgd0h0JTziaWWTMXInlVfIAbBaLB0I/9qdF7bkkc3PWIRD1nZwzddlU/ngmNLkXKOICYk0K7FF0F1M3ZJGYRjLCYLus71CsRPWo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749230134; c=relaxed/simple; bh=8diJvF/mwbXOH2BE2fhv1aFGPeFRQuSv1D/PYLS1Ljw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=e9bbLfxqpR6n0MpJ2UXHmyzlOOzgm3hgTC2AQXsdzw0Tv/XKEc3rntFHmnSr69TSs37DM/K9FhAjRaGzq3rqKlZOYOoVEEQmR5Qfk/tjWSgzLC2PUn/oUGrrQNcgfTQAYaZTQozBEFiANLeL5Bz9w3EM5IF0tVTNrML/M8oRK48= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1F70385703B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749230133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ibVyRdfdMOrygbneln8IeFGWDZtKzyoYIAUqy7n5MvE=; b=Ap1fXzxdRo3e8dZnGGlavAr19xuVPlUix2eeOlBqxmupqSN3HW2p7BDFlYeo9r9so+JM9X 0TvpVGN2KvW38TffQtfCT69y9FnauOwVAFBGnevckp398j8IMXW/cLCI0cLAOi3lYUHI5H +gLmrbuX1CrzZOZ6lGSEmObg3/eYviU= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-60-LLREsw4ZNqaAxcrZLoOb8w-1; Fri, 06 Jun 2025 13:15:30 -0400 X-MC-Unique: LLREsw4ZNqaAxcrZLoOb8w-1 X-Mimecast-MFC-AGG-ID: LLREsw4ZNqaAxcrZLoOb8w_1749230128 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 26E2919560AD; Fri, 6 Jun 2025 17:15:28 +0000 (UTC) Received: from f41-zbm-amd (unknown [10.22.88.9]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 420B430001B7; Fri, 6 Jun 2025 17:15:26 +0000 (UTC) Date: Fri, 6 Jun 2025 10:15:21 -0700 From: Kevin Buettner To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb.multi/attach-no-multi-process.exp: Detect no remote non-stop Message-ID: <20250606101521.6c70c0e1@f41-zbm-amd> In-Reply-To: <20250606162932.960463-1-pedro@palves.net> References: <20250606162932.960463-1-pedro@palves.net> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: KCewzFyGABp2r801j3Rih79lAJ8kjZyxfysLAIXD5R8_1749230128 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On Fri, 6 Jun 2025 17:29:31 +0100 Pedro Alves wrote: > Running gdb.multi/attach-no-multi-process.exp on Cygwin, where > GDBserver does not support non-stop mode, I see: > > FAIL: gdb.multi/attach-no-multi-process.exp: target_non_stop=off: info > threads FAIL: gdb.multi/attach-no-multi-process.exp: target_non_stop=on: > attach to the program via remote (timeout) FAIL: > gdb.multi/attach-no-multi-process.exp: target_non_stop=on: info threads > (timeout) > > Let's ignore the first "info threads" fail. The timeouts look like > this: > > builtin_spawn /home/alves/gdb-cache-cygwin/gdb/../gdbserver/gdbserver > --once --multi localhost:2346 Listening on port 2346 > target extended-remote localhost:2346 > Remote debugging using localhost:2346 > Non-stop mode requested, but remote does not support non-stop > (gdb) gdb_do_cache: can_spawn_for_attach ( ) > builtin_spawn > /home/alves/gdb/build-cygwin-testsuite/outputs/gdb.multi/attach-no-multi-process/attach-no-multi-process > attach 14540 FAIL: gdb.multi/attach-no-multi-process.exp: > target_non_stop=on: attach to the program via remote (timeout) info > threads FAIL: gdb.multi/attach-no-multi-process.exp: target_non_stop=on: > info threads (timeout) > > Note the "Non-stop mode requested, but remote does not support > non-stop" line. > > The intro to gdb_target_cmd_ext says: > > # gdb_target_cmd_ext > # Send gdb the "target" command. Returns 0 on success, 1 on failure, 2 > on # unsupported. > > That's perfect here, we can just use gdb_target_cmd_ext instead of > gdb_target_cmd, and check for 2 (unsupported). That's what this patch > does. > > However gdb_target_cmd_ext incorrectly returns 1 instead of 2 for the > case where the remote target says it does not support non-stop. That > is also fixed by this patch. > > With this, we no longer get those timeout fails. We get instead: > > target extended-remote localhost:2346 > Remote debugging using localhost:2346 > Non-stop mode requested, but remote does not support non-stop > (gdb) UNSUPPORTED: gdb.multi/attach-no-multi-process.exp: > target_non_stop=on: non-stop RSP LGTM. Approved-by: Kevin Buettner