+/* Enable storing stack temporaries for thread with id PTID and
+ disable and clear the stack temporaries on destruction. */
+
+class enable_thread_stack_temporaries
+{
+public:
+
+ explicit enable_thread_stack_temporaries (ptid_t ptid)
+ : m_ptid (ptid)
+ {
+ struct thread_info *tp = find_thread_ptid (ptid);
+
+ gdb_assert (tp != NULL);
+ tp->stack_temporaries_enabled = true;
+ tp->stack_temporaries.clear ();
+ }
+
+ ~enable_thread_stack_temporaries ()
+ {
+ struct thread_info *tp = find_thread_ptid (m_ptid);
+
+ if (tp != NULL)
+ {
+ tp->stack_temporaries_enabled = false;
+ tp->stack_temporaries.clear ();
+ }
+ }
+
+ DISABLE_COPY_AND_ASSIGN (enable_thread_stack_temporaries);
+
+private:
+
+ ptid_t m_ptid;
+};
+
+extern bool thread_stack_temporaries_enabled_p (ptid_t ptid);
+
+extern void push_thread_stack_temporary (ptid_t ptid, struct value *v);
+
+extern struct value *get_last_thread_stack_temporary (ptid_t);
+
+extern bool value_in_thread_stack_temporaries (struct value *, ptid_t);
+
+/* 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 PTID at this point.
+ Returns true if registers may be accessed; false otherwise. */
+extern bool can_access_registers_ptid (ptid_t ptid);
+
+/* 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);
+