From: "Tom de Vries (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: gdb-patches@sourceware.org
Cc: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>,
Mihails Strasuns <mihails.strasuns@intel.com>,
Pedro Alves <palves@redhat.com>
Subject: [review v2] [gdb/threads] Fix hang in stop_all_threads after killing inferior
Date: Thu, 30 Jan 2020 17:43:00 -0000 [thread overview]
Message-ID: <20200130174219.B4DEC20AF7@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1580307037000.Ibe1f29251fe2ff1c1991f041babbe18373c113b1@gnutoolchain-gerrit.osci.io>
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 <tdevries@suse.de>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Tom de Vries <tdevries@suse.de>
Gerrit-CC: Mihails Strasuns <mihails.strasuns@intel.com>
Gerrit-CC: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Gerrit-Comment-Date: Thu, 30 Jan 2020 17:42:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
next prev parent reply other threads:[~2020-01-30 17:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 14:11 [review] " Tom de Vries (Code Review)
2020-01-29 15:33 ` Mihails Strasuns (Code Review)
2020-01-29 16:13 ` Tom de Vries (Code Review)
2020-01-29 16:20 ` Tankut Baris Aktemur (Code Review)
2020-01-30 16:30 ` [review v2] " Tom de Vries (Code Review)
2020-01-30 17:36 ` Tankut Baris Aktemur (Code Review)
2020-01-30 17:42 ` Tom de Vries (Code Review)
2020-01-30 17:43 ` Tom de Vries (Code Review) [this message]
2020-01-30 17:52 ` [review v3] " Tom de Vries (Code Review)
2020-02-03 14:30 ` Tankut Baris Aktemur (Code Review)
2020-02-03 15:20 ` Tom de Vries (Code Review)
2020-02-05 19:53 ` [review v4] " Tom de Vries (Code Review)
2020-02-05 19:53 ` Tom de Vries (Code Review)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200130174219.B4DEC20AF7@gnutoolchain-gerrit.osci.io \
--to=gerrit@gnutoolchain-gerrit.osci.io \
--cc=gdb-patches@sourceware.org \
--cc=gnutoolchain-gerrit@osci.io \
--cc=mihails.strasuns@intel.com \
--cc=palves@redhat.com \
--cc=tankut.baris.aktemur@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox