This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[review v2] infrun: handle already-exited threads when attempting to stop
- From: "Tom de Vries (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Tankut Baris Aktemur <tankut dot baris dot aktemur at intel dot com>, gdb-patches at sourceware dot org
- Cc: Pedro Alves <palves at redhat dot com>, Luis Machado <luis dot machado at linaro dot org>
- Date: Thu, 30 Jan 2020 04:10:52 -0500
- Subject: [review v2] infrun: handle already-exited threads when attempting to stop
- Auto-submitted: auto-generated
- References: <gerrit.1571405222000.I7cec98f40283773b79255d998511da434e9cd408@gnutoolchain-gerrit.osci.io>
- Reply-to: gnutoolchain-gerrit at osci dot io
Tom de Vries has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/133
......................................................................
Patch Set 2:
(1 comment)
| --- gdb/infrun.c
| +++ gdb/infrun.c
| @@ -4494,0 +4500,19 @@ stop_all_threads (void)
| +
| + /* Set the threads as non-executing to avoid infinitely
| + waiting for them to stop. */
| + mark_non_executing_threads (event_ptid, ws);
| +
| + if (ws.kind == TARGET_WAITKIND_NO_RESUMED)
| + {
| + /* Do nothing. Already marked the threads. */
| + }
| + if (ws.kind == TARGET_WAITKIND_THREAD_EXITED)
PS2, Line 4509:
This doesn't look right. Did you mean to write:
else if (ws.kind == TARGET_WAITKIND_THREAD_EXITED)
?
| + delete_thread (t);
| + else
| + {
| + /* TARGET_WAITKIND_EXITED or
| + TARGET_WAITKIND_SIGNALLED. */
| + /* Need to restore the context because
| + handle_inferior_exit switches it. */
| + scoped_restore_current_pspace_and_thread restore;
| + handle_inferior_exit (event_ptid, ws);
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I7cec98f40283773b79255d998511da434e9cd408
Gerrit-Change-Number: 133
Gerrit-PatchSet: 2
Gerrit-Owner: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Gerrit-Reviewer: Luis Machado <luis.machado@linaro.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Gerrit-CC: Tom de Vries <tdevries@suse.de>
Gerrit-Comment-Date: Thu, 30 Jan 2020 09:10:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment