From patchwork Fri Sep 6 23:27:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 34435 Received: (qmail 37066 invoked by alias); 6 Sep 2019 23:36:56 -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 37057 invoked by uid 89); 6 Sep 2019 23:36:56 -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=HX-Languages-Length:827 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; Fri, 06 Sep 2019 23:36:55 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 32A9530982B2 for ; Fri, 6 Sep 2019 23:28:20 +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 C55A95D9D3 for ; Fri, 6 Sep 2019 23:28:19 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 12/23] Use all_non_exited_inferiors in infrun.c Date: Sat, 7 Sep 2019 00:27:56 +0100 Message-Id: <20190906232807.6191-13-palves@redhat.com> In-Reply-To: <20190906232807.6191-1-palves@redhat.com> References: <20190906232807.6191-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 f25cbcd5e8..d27b47c6a8 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4592,11 +4592,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) {