+/* Delete any thread the target says is no longer alive. */
+
+extern void prune_threads (void);
+
+/* Delete threads marked THREAD_EXITED. Unlike prune_threads, this
+ does not consult the target about whether the thread is alive right
+ now. */
+extern void delete_exited_threads (void);
+
+/* Return true if PC is in the stepping range of THREAD. */
+
+int pc_in_thread_step_range (CORE_ADDR pc, struct thread_info *thread);
+
+/* Enable storing stack temporaries for thread THR and disable and
+ clear the stack temporaries on destruction. Holds a strong
+ reference to THR. */
+
+class enable_thread_stack_temporaries
+{
+public:
+
+ explicit enable_thread_stack_temporaries (struct thread_info *thr)
+ : m_thr (thr)
+ {
+ gdb_assert (m_thr != NULL);
+
+ m_thr->incref ();
+
+ m_thr->stack_temporaries_enabled = true;
+ m_thr->stack_temporaries.clear ();
+ }
+
+ ~enable_thread_stack_temporaries ()
+ {
+ m_thr->stack_temporaries_enabled = false;
+ m_thr->stack_temporaries.clear ();
+
+ m_thr->decref ();
+ }
+
+ DISABLE_COPY_AND_ASSIGN (enable_thread_stack_temporaries);
+
+private:
+
+ struct thread_info *m_thr;
+};
+
+extern bool thread_stack_temporaries_enabled_p (struct thread_info *tp);
+
+extern void push_thread_stack_temporary (struct thread_info *tp, struct value *v);
+
+extern value *get_last_thread_stack_temporary (struct thread_info *tp);
+
+extern bool value_in_thread_stack_temporaries (struct value *,
+ struct thread_info *thr);
+
+/* Add TP to the end of its inferior's pending step-over chain. */
+
+extern void thread_step_over_chain_enqueue (struct thread_info *tp);
+
+/* Remove TP from its inferior's pending step-over chain. */
+
+extern void thread_step_over_chain_remove (struct thread_info *tp);
+
+/* Return the next thread in the step-over chain starting at TP. NULL
+ if TP is the last entry in the chain. */
+
+extern struct thread_info *thread_step_over_chain_next (struct thread_info *tp);
+
+/* Return true if TP is in the step-over chain. */
+
+extern int thread_is_in_step_over_chain (struct thread_info *tp);
+
+/* Cancel any ongoing execution command. */
+
+extern void thread_cancel_execution_command (struct thread_info *thr);
+
+/* Check whether it makes sense to access a register of the current
+ thread at this point. If not, throw an error (e.g., the thread is
+ executing). */
+extern void validate_registers_access (void);
+
+/* Check whether it makes sense to access a register of THREAD at this point.
+ Returns true if registers may be accessed; false otherwise. */
+extern bool can_access_registers_thread (struct thread_info *thread);
+
+/* Returns whether to show which thread hit the breakpoint, received a
+ signal, etc. and ended up causing a user-visible stop. This is
+ true iff we ever detected multiple threads. */
+extern int show_thread_that_caused_stop (void);
+
+/* Print the message for a thread or/and frame selected. */
+extern void print_selected_thread_frame (struct ui_out *uiout,
+ user_selected_what selection);
+
+/* Helper for the CLI's "thread" command and for MI's -thread-select.
+ Selects thread THR. TIDSTR is the original string the thread ID
+ was parsed from. This is used in the error message if THR is not
+ alive anymore. */
+extern void thread_select (const char *tidstr, class thread_info *thr);
+