From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by sourceware.org (Postfix) with ESMTPS id 666093851C0D for ; Mon, 6 Jul 2020 19:03:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 666093851C0D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wm1-f54.google.com with SMTP id j18so40399922wmi.3 for ; Mon, 06 Jul 2020 12:03:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=vzaU6zokcqe6MpBYM5Z2TBQs+iAQaxzV1LCwSc4el9E=; b=VrNlg36swh/+Zh6ha5ahjIoKL8HzdKI6FTru15GsLTn9gQVb+30sCj/zPbe/TL+dIp sFvgAz7JD5I3iGv7t9hzDnrLYzMoiUlutjHEoxHj08T2LPEilH0PYAjN43F32F0HygVi 2L/nB456n8qKu1GZhAp2bUJsTKuFMNPCbTYebNQ1LJjph50gpBibRclcilR2ccDoNDdO 6plHQ18DSVzRicMwF1RbZviWXeRAsMnUqIjXGZvtK9k+PJEzgF2k7h+hsLTWXIIBqxn0 7GSEvacVgjua4SVC1hD+9xFy4LqZeu+Pv3ZEM4MKds4Fdchv0FwJZLpJly3rka+Tx0ri 5EuQ== X-Gm-Message-State: AOAM530RZMKMKVbhoRhiYRn/OzzhEA11TklNwnYcsIqOnJ9dtaPFks+y 6F8hmlFAFN7lYqYojVZNgLqWgQCWn8uvmA== X-Google-Smtp-Source: ABdhPJzRnTsoO6Ls8d/swkPn70vWgFe9KkU3wI3Vh2lApYGZDAQGkFXT8jZZzqdUVwJ4cp/eg7mOBw== X-Received: by 2002:a1c:1bc4:: with SMTP id b187mr613131wmb.105.1594062180364; Mon, 06 Jul 2020 12:03:00 -0700 (PDT) Received: from localhost ([2001:8a0:f91a:c400:8728:8fef:5b85:5934]) by smtp.gmail.com with ESMTPSA id z16sm25051353wrr.35.2020.07.06.12.02.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Jul 2020 12:02:59 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 2/7] Fix latent bug in target_pass_ctrlc Date: Mon, 6 Jul 2020 20:02:47 +0100 Message-Id: <20200706190252.22552-3-pedro@palves.net> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20200706190252.22552-1-pedro@palves.net> References: <20200706190252.22552-1-pedro@palves.net> X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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: Mon, 06 Jul 2020 19:03:02 -0000 We were checking the thr->executing of an exited thread. gdb/ChangeLog: PR gdb/26199 * target.c (target_pass_ctrlc): Looking at the inferiors non-exited threads, not all threads. --- gdb/target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/target.c b/gdb/target.c index f4e4f05b5f..cd66675e8a 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3274,7 +3274,7 @@ target_pass_ctrlc (void) if (proc_target == NULL) continue; - for (thread_info *thr : inf->threads ()) + for (thread_info *thr : inf->non_exited_threads ()) { /* A thread can be THREAD_STOPPED and executing, while running an infcall. */ -- 2.14.5