From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mFPfKoczK2g2NyoAWB0awg (envelope-from ) for ; Mon, 19 May 2025 09:35:03 -0400 Received: by simark.ca (Postfix, from userid 112) id AAD8E1E11C; Mon, 19 May 2025 09:35:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,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 50B561E102 for ; Mon, 19 May 2025 09:35:03 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 026AA3858280 for ; Mon, 19 May 2025 13:35:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 026AA3858280 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by sourceware.org (Postfix) with ESMTPS id D30303858031 for ; Mon, 19 May 2025 13:25:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D30303858031 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D30303858031 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1747661142; cv=none; b=dQ+rt/coJR4l3oHtxopmF7juCeHEmsaJm9LxNe6IF2jRsVLw6DCjubyVQHNOmJRYI9GY5xpjgirA/oy2p/hwu/htQcvhRXBrK08Q1xccCedwjuW5Vg/lChKPzY/qKu4p9iSyzzBsXaKbf8uZ/cY7eARtAlnF3sR30z5yUtsakBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1747661142; c=relaxed/simple; bh=+5/6itYCylSxENDj2hirhbMfpfnvlQ34ATIZzU5tYzc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Jqdtkp40qmNNUB5o9Oe2EXNRVQX3gj9zHLdf0Q6GQTJZf7GHwpLb2LYclj7Dm/tiSj+Q1Cbx0E9aLICoPEoXdu+UU2nFamcg4TvaSd/gi1PyCqYAUeGw6Dqej43KjAmoevw6SYA4vYHaE2zgH+baehkgGzbb3UxJhWYgcP4lUow= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D30303858031 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43d04dc73b7so47976265e9.3 for ; Mon, 19 May 2025 06:25:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747661140; x=1748265940; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CU/tAyw7HxyGmLhcJCSaODiatfccW5qDHwRVam6srOM=; b=V2gEgbnGzntdtfffq+f7EI5QIgOAU5ydzcn0OJQTJThWMjDxfhl8vGGqaU7oB8FpCi WQEHnXLkIkst/JPbVhjxK5O8FbTjj3T6hbLOiyrSE5bjj5z3NdiOhY0HFidlIwD0hS1l tVFot5MCUVMA/t6Mx6Ymkw2NXjbShtJ/JsxfCs2XRMV68d2dppmM9nMiFpMo0WQS2o64 5je19jcbECBOWCFKQLeK7wS7qMwjn0FVbOcNSFKh7OxAemnCOVFDEOdp/6TVxTtDklE0 XSihYGtG4WOiZIlYXT2Yg77w+Jqgy4LAHqfu2EcSh1zIa28KSEPkY1G04EDlW0GT3O7h NqaA== X-Gm-Message-State: AOJu0YzKX4FGnLZBVdTFM8Go8nDFLoNghfY2HEWlgz3AiIwg1L5xi6KF l0iVB1ofQm5gjnhv4JztsnO/CT/rEjBps9x4PjbumrQnQwFVqoE0FjU1Zzh4AYwe X-Gm-Gg: ASbGncvmAqg8GVP+0cGsI1IqncEuwoeAhiP2XNMDeBGAPO7LaaF48xdaXSIcTJmPSBv yLlZmSAjv2eNtx9pdEK7YI+qsGOe0Psu2ObKBZrpvdiVnlDwiyCzcMxw71Z5bGnsTezSFy1ORwO Qs9XbZiPMo+zleGBlkHwtWZ2f4Z8mVNzR4olMr4E4PS5o9VTes5Kz7haWFlz96SacAS7UZ39qtf Fccg7mk9tQ2kRi7ncUjl36E9eWWp6fPMot97oAFEbQCedRxo46R8brXX++6NPMtyLoZ8zaRqCaj B2Na+i08VEQmhaK0GB3Ova7WpFZRnhZk3uX0MccPChvc+nSjJo4= X-Google-Smtp-Source: AGHT+IF6sJVt72IwnEHKxEvY/BmXUf1xt665Mb2rxT50A1QMmrrxQXi40hhj0GQGpbkcqJf0L/ayGg== X-Received: by 2002:a05:600c:3d11:b0:442:cab1:e092 with SMTP id 5b1f17b1804b1-442fd618f88mr118045245e9.11.1747661140375; Mon, 19 May 2025 06:25:40 -0700 (PDT) Received: from localhost ([2001:8a0:4fe9:b400:8d90:6f0d:36bf:32df]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a36835ef41sm8531520f8f.94.2025.05.19.06.25.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 May 2025 06:25:39 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH v2 46/47] Windows gdb: Always non-stop (default to "maint set target-non-stop on") Date: Mon, 19 May 2025 14:23:07 +0100 Message-ID: <20250519132308.3553663-47-pedro@palves.net> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250519132308.3553663-1-pedro@palves.net> References: <20250519132308.3553663-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Since having the target backend work in non-stop mode adds features compared to old all-stop mode (signal/exception passing/suppression is truly per-thread), this switches the backend to do all-stop-on-top-of-non-stop, by having windows_nat_target::always_non_stop_p return true if non-stop mode is possible. To be clear, this just changes how the backend works in coordination with infrun. The user-visible mode default mode is still all-stop. The difference is that infrun is responsible for stopping all threads when needed, instead of the backend (actually the kernel) always doing that before reporting an event to infrun. Change-Id: I83d23dbb1edc7692d5d8b37f5b9e0264c74d4940 --- gdb/windows-nat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 830ed0e381f..bc574377ca5 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -570,6 +570,7 @@ struct windows_nat_target final : public x86_nat_target } bool supports_non_stop () override; + bool always_non_stop_p () override; void async (bool enable) override; @@ -4118,6 +4119,15 @@ windows_nat_target::supports_non_stop () return dbg_reply_later_available (); } +/* Implementation of the target_ops::always_non_stop_p method. */ + +bool +windows_nat_target::always_non_stop_p () +{ + /* If we can do non-stop, prefer it. */ + return supports_non_stop (); +} + void _initialize_windows_nat (); void _initialize_windows_nat () -- 2.49.0