aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdbserver/ChangeLog6
-rw-r--r--gdbserver/inferiors.cc2
2 files changed, 7 insertions, 1 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index e93e4ea..fd0a4bf 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -1,3 +1,9 @@
+2020-10-20 Tom Tromey <tromey@adacore.com>
+
+ PR gdb/26742:
+ * inferiors.cc (remove_thread): Clear current_thread before
+ freeing the thread.
+
2020-10-13 Kamil Rytarowski <n54@gmx.com>x
* netbsd-low.cc (netbsd_tdesc): Remove.
diff --git a/gdbserver/inferiors.cc b/gdbserver/inferiors.cc
index 861c9f3..9a1280d 100644
--- a/gdbserver/inferiors.cc
+++ b/gdbserver/inferiors.cc
@@ -103,9 +103,9 @@ remove_thread (struct thread_info *thread)
discard_queued_stop_replies (ptid_of (thread));
all_threads.remove (thread);
- free_one_thread (thread);
if (current_thread == thread)
current_thread = NULL;
+ free_one_thread (thread);
}
void *