From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IcPhNQW2BGrptDYAWB0awg (envelope-from ) for ; Wed, 13 May 2026 13:33:57 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=DkKymphX; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D91191E0BA; Wed, 13 May 2026 13:33:57 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 805B11E067 for ; Wed, 13 May 2026 13:33:57 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 24AA44BBC0BC for ; Wed, 13 May 2026 17:33:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24AA44BBC0BC Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=DkKymphX Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by sourceware.org (Postfix) with ESMTPS id B3A544BBC0A3 for ; Wed, 13 May 2026 17:33:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3A544BBC0A3 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B3A544BBC0A3 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778693581; cv=none; b=l3dbEN1s/lWmolOFGObMcTInPh97CVKvzkwqAYebxTTuA0/3k3SpboZeFf5EZZzdUVJ/UdjVyIcMCP36jF5oNjCMMjgG9TNeYW6fGCMEiKTjIlf1t/yPXxcY3jdVJ72+2oi2zsEsoto71IZ3vOhEThtzTmrxfZuR0Kxl+Xgd5+U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778693581; c=relaxed/simple; bh=i78gmO5HFFR9KZYQ3vyqk2fI9irxNhFJBG54lrg012A=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=FQCzF++fa2I1YSrDAkvRd8jPDRSNKHi8A+FC5KhpYVLAVsi2CAhzbnD2Sx4WtYyBfpEIhhwzWiOtcfXlZ8VncrENabpLTworLFUAacxqbninyMMalyDBeoMfXSrrSDcGiZScAohGS8SVWNNVYRJYovpeLjE4uRT2giUh46knvpg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=DkKymphX DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3A544BBC0A3 Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-6948fb494a0so3805387eaf.2 for ; Wed, 13 May 2026 10:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1778693581; x=1779298381; darn=sourceware.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=tt7XHi31w+zslJgdwCFwb4Y0h6YqjAsODM53wnWl0/c=; b=DkKymphXugmtgk4NTaJDwYvr1qNRB3Qj6xXnkhki5/hpv5/eEeANaAPe/s4RYG6ybe F4MlOvhqhmapblrtKpbfbV6oCgBZqRqkjWctWuF1At9sardgpxj5j3NVqlrxhCCIOLTw o+5QvSVkIpv/Hb19Ns0fucSLDPGK0kEHQbYbmYUnKxYOR4GARTZ5L82N5dIjTnkYlcOa Of4Fu0URnIR1SpF7wfyTjVmgIDQKqq1VepYipncc/2VB8gx/ajZqaiFRe41eqnv4xGcU gofLRzD8RlOvpg/Knwh/AnVvhKTNwZ9VjatyCMOYOk4xwk4T5OzWDdfXlGjqMHWtcjf7 iifA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778693581; x=1779298381; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=tt7XHi31w+zslJgdwCFwb4Y0h6YqjAsODM53wnWl0/c=; b=gKixQy0SC+d1upN8a730A96HbpHe5xcZj/svC0svHE1TYWp7IxepVhPh9l/PuoqKP2 mv7ykDjZATPeVwnT7G673thMbc3bA9J5478t8HxITn+G+l6rt4rgPI41RZfsBJZNEEc8 M0kCW157bw45TLcUrqLinj0RGxAQFs3im0XsDQ/JgOeXyPm7GFepv0qzEiVV/IVRq1Qi mt3lXnIJl5Lte5qkxmWQxkjb3RLMkv3QYAzmFsFnzGtFFZb6tzwQy2PsN/sA46yw2Mxf 8FVJLDduSyKd/BQqKTdAUG7yn/E2Y7J7himIRfljtOuqN8pVkf+qKN/LaTYa7fRUYMBg qoXw== X-Gm-Message-State: AOJu0Yxrp0m+bh1hRxwZdlD1oszPWOuzuWBKjpBq9zX0AhfDbfAHKnsD NaIgEeL5nrPPoVP9E+W5TJdAvBeJryOKzHST4FNzBDCqWMjA9kgT8GCfdgpIKRxfpJ9yKIg5Cvj wcwc= X-Gm-Gg: Acq92OGa3w8ryABP0RK3kvNz8yjYXCT+b0zzsZmK26Tu8655RJ9p9u+ftY4LTjqVM9X luS9b3tUFgbKS8/y1xKCiXfo9j2yKzKdKhzUxKXtGStwSkCEYWh0zvBF7itD91Qmlepym7UpyNO 09j+E2aTcjMOuwshjV5HveL5sIb4w2EaSnU7fM/IaWwhq6rpv6qNB/jkmXXmynAVpeW5hywCoHy dpQH4jwSSyQmby9Hwc2aBVVTfFtYZ+Wr/heNeW8kWnJJrYXIDOy7mZRTms/mVE3duanENxmfh4C zjgPZBzbgr/gr6quuLYNERI4ZvQKp2WDMONCqmjlys0+MK7LF0Mzsh0EIEuUwV7xbdqVzePT3gX 8m9hVQ8B1Q/rxVhx/765ptZzXfNnFfVO628gJDDogJVcpn3Tg8ZS0GnX5u39ds+6UEmvZ9OagrJ QhWLTCSZeiONSh5t7fFGur5lMbOHh0e4QNGdpTndVSfOPnXsK/EcakSg== X-Received: by 2002:a05:6820:1908:b0:694:9e10:fdce with SMTP id 006d021491bc7-69b78d48a1fmr2261602eaf.4.1778693580915; Wed, 13 May 2026 10:33:00 -0700 (PDT) Received: from [192.168.0.26] (75-166-225-82.hlrn.qwest.net. [75.166.225.82]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-439fc1d7be5sm47734fac.5.2026.05.13.10.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 10:33:00 -0700 (PDT) From: Tom Tromey Date: Wed, 13 May 2026 11:32:58 -0600 Subject: [PATCH 1/2] Use bool in continue_1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260513-remove-for-each-v1-1-8793bd79f781@adacore.com> References: <20260513-remove-for-each-v1-0-8793bd79f781@adacore.com> In-Reply-To: <20260513-remove-for-each-v1-0-8793bd79f781@adacore.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.3 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 This changes continue_1 to use 'bool' and renames its parameter. The renaming is important to avoid shadowing the 'all_threads' function. --- gdb/infcmd.c | 4 ++-- gdb/inferior.h | 2 +- gdb/mi/mi-main.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index f3f15c9ae1d..d4cd2c7d5cd 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -746,12 +746,12 @@ ensure_not_running (void) } void -continue_1 (int all_threads) +continue_1 (bool all_threads_p) { ERROR_NO_INFERIOR; ensure_not_tfind_mode (); - if (non_stop && all_threads) + if (non_stop && all_threads_p) { /* Don't error out if the current thread is running, because there may be other stopped threads. */ diff --git a/gdb/inferior.h b/gdb/inferior.h index 9c031035a23..d141aacba8a 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -225,7 +225,7 @@ extern void attach_command (const char *, int); extern void registers_info (const char *, bool); -extern void continue_1 (int all_threads); +extern void continue_1 (bool all_threads_p); extern void interrupt_target_1 (bool all_threads); diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 52e642e1464..53821e69042 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -286,7 +286,7 @@ exec_continue (const char *const *argv, int argc) } else { - continue_1 (0); + continue_1 (false); } } else @@ -296,7 +296,7 @@ exec_continue (const char *const *argv, int argc) if (current_context->all) { sched_multi = 1; - continue_1 (0); + continue_1 (false); } else { @@ -304,7 +304,7 @@ exec_continue (const char *const *argv, int argc) either all threads, or one thread, depending on the 'scheduler-locking' variable. Let's continue to do the same. */ - continue_1 (1); + continue_1 (true); } } } -- 2.54.0