From patchwork Thu Oct 17 22:50:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 35112 Received: (qmail 107067 invoked by alias); 17 Oct 2019 22:50:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 106830 invoked by uid 89); 17 Oct 2019 22:50:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Oct 2019 22:50:40 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05A618AC6F7 for ; Thu, 17 Oct 2019 22:50:39 +0000 (UTC) Received: from localhost.localdomain (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B2A51001DC0 for ; Thu, 17 Oct 2019 22:50:38 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH v2 12/24] Use all_non_exited_inferiors in infrun.c Date: Thu, 17 Oct 2019 23:50:14 +0100 Message-Id: <20191017225026.30496-13-palves@redhat.com> In-Reply-To: <20191017225026.30496-1-palves@redhat.com> References: <20191017225026.30496-1-palves@redhat.com> gdb/ChangeLog: yyyy-mm-dd Pedro Alves * infrun.c (handle_no_resumed): Use all_non_exited_inferiors. --- gdb/infrun.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index a759c5c204..ab73a56604 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4589,11 +4589,8 @@ handle_no_resumed (struct execution_control_state *ecs) process exited meanwhile (thus updating the thread list results in an empty thread list). In this case we know we'll be getting a process exit event shortly. */ - for (inferior *inf : all_inferiors ()) + for (inferior *inf : all_non_exited_inferiors ()) { - if (inf->pid == 0) - continue; - thread_info *thread = any_live_thread_of_inferior (inf); if (thread == NULL) {