Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Tankut Baris Aktemur (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Cc: 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:36:00 -0000	[thread overview]
Message-ID: <20200130164104.1B23120AF7@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1580307037000.Ibe1f29251fe2ff1c1991f041babbe18373c113b1@gnutoolchain-gerrit.osci.io>

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 <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 16:41:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


  parent reply	other threads:[~2020-01-30 16:41 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) [this message]
2020-01-30 17:42 ` Tom de Vries (Code Review)
2020-01-30 17:43 ` Tom de Vries (Code Review)
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=20200130164104.1B23120AF7@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=tdevries@suse.de \
    /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