aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-04-10 15:18:49 +0100
committerPedro Alves <palves@redhat.com>2017-04-10 15:18:49 +0100
commit996812e3d43f78b17b6454d2948cd825ec98c63b (patch)
tree695c7fb33455a4d9b2d0e3ab24950c7db9955060 /gdb/thread.c
parent845b344fd54ba381a826b271dd33682d1f148438 (diff)
downloadgdb-996812e3d43f78b17b6454d2948cd825ec98c63b.zip
gdb-996812e3d43f78b17b6454d2948cd825ec98c63b.tar.gz
gdb-996812e3d43f78b17b6454d2948cd825ec98c63b.tar.bz2
GC gdb/thread.c:current_thread_cleanup_chain
Commit 803bdfe43083475c7df3db38dc96f4e20d05457d ("Don't delete thread_info if refcount isn't zero") eliminated restore_current_thread_ptid_changed, so current_thread_cleanup_chain is no longer necessary either. gdb/ChangeLog: 2017-04-10 Pedro Alves <palves@redhat.com> * thread.c (struct current_thread_cleanup) <next>: Delete field. (current_thread_cleanup_chain): Delete. (restore_current_thread_cleanup_dtor) (make_cleanup_restore_current_thread): Remove references to current_thread_cleanup_chain.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index 2d936cd..3aca307 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -1549,11 +1549,6 @@ restore_selected_frame (struct frame_id a_frame_id, int frame_level)
struct current_thread_cleanup
{
- /* Next in list of currently installed 'struct
- current_thread_cleanup' cleanups. See
- 'current_thread_cleanup_chain' below. */
- struct current_thread_cleanup *next;
-
thread_info *thread;
struct frame_id selected_frame_id;
int selected_frame_level;
@@ -1562,13 +1557,6 @@ struct current_thread_cleanup
int was_removable;
};
-/* A chain of currently installed 'struct current_thread_cleanup'
- cleanups. Restoring the previously selected thread looks up the
- old thread in the thread list by ptid. If the thread changes ptid,
- we need to update the cleanup's thread structure so the look up
- succeeds. */
-static struct current_thread_cleanup *current_thread_cleanup_chain;
-
static void
do_restore_current_thread_cleanup (void *arg)
{
@@ -1609,8 +1597,6 @@ restore_current_thread_cleanup_dtor (void *arg)
struct thread_info *tp;
struct inferior *inf;
- current_thread_cleanup_chain = current_thread_cleanup_chain->next;
-
if (old->thread != NULL)
old->thread->decref ();
@@ -1642,9 +1628,6 @@ make_cleanup_restore_current_thread (void)
old->inf_id = current_inferior ()->num;
old->was_removable = current_inferior ()->removable;
- old->next = current_thread_cleanup_chain;
- current_thread_cleanup_chain = old;
-
if (!ptid_equal (inferior_ptid, null_ptid))
{
struct frame_info *frame;