[8/8] Fix removing inferiors from within "thread apply" commands
Commit Message
On 04/19/2017 01:15 PM, Pedro Alves wrote:
>>> -struct thread_info
>>> >> +/* Threads are intrusively refcounted objects. Being the
>>> >> + user-selected thread is normally considered an implicit strong
>>> >> + reference and is thus not accounted in the refcount, unlike
>>> >> + inferior objects. This is necessary, because there's no "current
>>> >> + thread" pointer. Instead the current thread is inferred from the
>>> >> + inferior_ptid global. However, when GDB needs to remember the
>>> >> + selected thread to later restore it, GDB bumps the thread object's
>>> >> + refcount, to prevent something deleting the thread object before
>>> >> + reverting back (e.g., due to a "kill" command. If the thread
>> >
>> > Missing ")"?
> Yes, I'll add it. (bah, looks like I forgot to refresh the patch
> before pushing. I'll really fix it in a follow up).
Like so. Pushed.
From a6c21d4a553de184562fd8409a5bcd3f2cc2561a Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Wed, 19 Apr 2017 13:16:05 +0100
Subject: [PATCH] gdbthread.h: Fix comment typo
gdb/ChangeLog:
2017-04-19 Pedro Alves <palves@redhat.com>
* gdbthread.h (thread): Add missing closing parenthesis in
comment.
---
gdb/ChangeLog | 5 +++++
gdb/gdbthread.h | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
@@ -1,5 +1,10 @@
2017-04-19 Pedro Alves <palves@redhat.com>
+ * gdbthread.h (thread): Add missing closing parenthesis in
+ comment.
+
+2017-04-19 Pedro Alves <palves@redhat.com>
+
* common/refcounted-object.h: New file.
* gdbthread.h: Include "common/refcounted-object.h".
(thread_info): Inherit from refcounted_object and add comments.
@@ -186,7 +186,7 @@ typedef VEC (value_ptr) value_vec;
inferior_ptid global. However, when GDB needs to remember the
selected thread to later restore it, GDB bumps the thread object's
refcount, to prevent something deleting the thread object before
- reverting back (e.g., due to a "kill" command. If the thread
+ reverting back (e.g., due to a "kill" command). If the thread
meanwhile exits before being re-selected, then the thread object is
left listed in the thread list, but marked with state
THREAD_EXITED. (See make_cleanup_restore_current_thread and