From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83878 invoked by alias); 30 Jan 2020 17:42:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 83870 invoked by uid 89); 30 Jan 2020 17:42:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1732 X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Jan 2020 17:42:26 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 8F8E52032F; Thu, 30 Jan 2020 12:42:24 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id D1DEF2018B; Thu, 30 Jan 2020 12:42:19 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id B4DEC20AF7; Thu, 30 Jan 2020 12:42:19 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Thu, 30 Jan 2020 17:43:00 -0000 From: "Tom de Vries (Code Review)" To: gdb-patches@sourceware.org Cc: Tankut Baris Aktemur , Mihails Strasuns , Pedro Alves Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review v2] [gdb/threads] Fix hang in stop_all_threads after killing inferior X-Gerrit-Change-Id: Ibe1f29251fe2ff1c1991f041babbe18373c113b1 X-Gerrit-Change-Number: 759 X-Gerrit-ChangeURL: X-Gerrit-Commit: a8c100706515cbcc9f5eb12a1eb73def536a1f4b In-Reply-To: References: X-Gerrit-Comment-Date: Thu, 30 Jan 2020 12:42:19 -0500 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Content-Type: text/plain; charset=UTF-8 Message-Id: <20200130174219.B4DEC20AF7@gnutoolchain-gerrit.osci.io> X-SW-Source: 2020-01/txt/msg00975.txt.bz2 Tom de Vries has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/759 ...................................................................... Patch Set 2: (1 comment) | --- gdb/infrun.c | +++ gdb/infrun.c | @@ -4773,10 +4773,18 @@ stop_all_threads (void) | } | | - if (event.ws.kind == TARGET_WAITKIND_NO_RESUMED | + if (event.ws.kind == TARGET_WAITKIND_SIGNALLED | + && event.ws.value.sig == GDB_SIGNAL_KILL) | + { | + thread_info *t = find_thread_ptid (event.target, event.ptid); | + save_waitstatus (t, &event.ws); | + t->resumed = 1; | + goto done; PS2, Line 4781: I've realized that the 'goto done' is not a good idea, since all_non_exited_threads can iterate over more than one inferior. I'll upload a new version that removes the 'goto done. | + } | + else if (event.ws.kind == TARGET_WAITKIND_NO_RESUMED | || event.ws.kind == TARGET_WAITKIND_THREAD_EXITED | || event.ws.kind == TARGET_WAITKIND_EXITED | || event.ws.kind == TARGET_WAITKIND_SIGNALLED) | { | /* All resumed threads exited | or one thread/process exited/signalled. */ | } -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: Ibe1f29251fe2ff1c1991f041babbe18373c113b1 Gerrit-Change-Number: 759 Gerrit-PatchSet: 2 Gerrit-Owner: Tom de Vries Gerrit-Reviewer: Pedro Alves Gerrit-Reviewer: Tom de Vries Gerrit-CC: Mihails Strasuns Gerrit-CC: Tankut Baris Aktemur Gerrit-Comment-Date: Thu, 30 Jan 2020 17:42:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment