From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 72B9B3857809 for ; Wed, 13 Jan 2021 04:44:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 72B9B3857809 X-ASG-Debug-ID: 1610513097-0c856e6cd56a7ce0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id oluApTlkN9aUL1dx (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Jan 2021 23:44:57 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.localdomain (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) by smtp.ebox.ca (Postfix) with ESMTP id 7C2F0441B21; Tue, 12 Jan 2021 23:44:57 -0500 (EST) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.157.6 X-Barracuda-Effective-Source-IP: 192-222-157-6.qc.cable.ebox.net[192.222.157.6] X-Barracuda-Apparent-Source-IP: 192.222.157.6 To: gdb-patches@sourceware.org Subject: [PATCH] gdb: remove unneeded argument in check_multi_target_resumption Date: Tue, 12 Jan 2021 23:44:56 -0500 X-ASG-Orig-Subj: [PATCH] gdb: remove unneeded argument in check_multi_target_resumption Message-Id: <20210113044456.2362936-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1610513097 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 1051 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.87206 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-25.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_QUARANTINE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 13 Jan 2021 04:44:59 -0000 If we reach the modified line, resume_target is necessarily nullptr, because of the check at the beginning of the function. So we'll necessarily iterate on all non-exited inferiors (across all targets), which is what we want, I believe. So the code seems to be correct, just remove the unnecessary argument. gdb/ChangeLog: * infrun.c (check_multi_target_resumption): Remove argument to all_non_exited_inferiors. Change-Id: If95704915dca19599d5f7f4732bbd6ccd20bf6b4 --- gdb/infrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 940f575e22a2..fc2a8becf724 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2809,7 +2809,7 @@ check_multi_target_resumption (process_stratum_target *resume_target) always-non-stop mode. */ inferior *first_not_non_stop = nullptr; - for (inferior *inf : all_non_exited_inferiors (resume_target)) + for (inferior *inf : all_non_exited_inferiors ()) { switch_to_inferior_no_thread (inf); -- 2.29.2