From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129559 invoked by alias); 30 Jan 2020 16:41:10 -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 129548 invoked by uid 89); 30 Jan 2020 16:41:09 -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= 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 16:41:08 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 4AD3B20307; Thu, 30 Jan 2020 11:41:06 -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 51E6B202F2; Thu, 30 Jan 2020 11:41:04 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 1B23120AF7; Thu, 30 Jan 2020 11:41:04 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Thu, 30 Jan 2020 17:36:00 -0000 From: "Tankut Baris Aktemur (Code Review)" To: Tom de Vries , gdb-patches@sourceware.org Cc: 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 11:41:03 -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: <20200130164104.1B23120AF7@gnutoolchain-gerrit.osci.io> X-SW-Source: 2020-01/txt/msg00973.txt.bz2 Tankut Baris Aktemur 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 | @@ -4767,11 +4767,19 @@ stop_all_threads (void) | if (debug_infrun) | { | fprintf_unfiltered (gdb_stdlog, | "infrun: stop_all_threads %s %s\n", | target_waitstatus_to_string (&event.ws).c_str (), | target_pid_to_str (event.ptid).c_str ()); | } | | - if (event.ws.kind == TARGET_WAITKIND_NO_RESUMED | + if (event.ws.kind == TARGET_WAITKIND_SIGNALLED | + && event.ws.value.sig == GDB_SIGNAL_KILL) PS2, Line 4776: Why only this case? Wouldn't the same problem be seen if, say, a different signal or an exited status was received? | + { | + thread_info *t = find_thread_ptid (event.target, event.ptid); | + save_waitstatus (t, &event.ws); | + t->resumed = 1; | + goto done; | + } | + else if (event.ws.kind == TARGET_WAITKIND_NO_RESUMED | || event.ws.kind == TARGET_WAITKIND_THREAD_EXITED | || event.ws.kind == TARGET_WAITKIND_EXITED -- 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 16:41:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment