/* Multi-process/thread control defs for GDB, the GNU debugger.
Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1997, 1998, 1999,
- 2000, 2007, 2008 Free Software Foundation, Inc.
+ 2000, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Lynx Real-Time Systems, Inc. Los Gatos, CA.
or a similar situation when stop_registers should be saved. */
int proceed_to_finish;
+ /* Nonzero if the thread is being proceeded for an inferior function
+ call. */
+ int in_infcall;
+
enum step_over_calls_kind step_over_calls;
/* Nonzero if stopped due to a step command. */
/* Find thread by GDB user-visible thread number. */
struct thread_info *find_thread_id (int num);
+/* Finds the first thread of the inferior given by PID. If PID is -1,
+ returns the first thread in the list. */
+struct thread_info *first_thread_of_process (int pid);
+
/* Change the ptid of thread OLD_PTID to NEW_PTID. */
void thread_change_ptid (ptid_t old_ptid, ptid_t new_ptid);
/* Reports if thread PTID is executing. */
extern int is_executing (ptid_t ptid);
+/* Merge the executing property of thread PTID over to its thread
+ state property (frontend running/stopped view).
+
+ "not executing" -> "stopped"
+ "executing" -> "running"
+ "exited" -> "exited"
+
+ If PIDGET (PTID) is -1, go over all threads.
+
+ Notifications are only emitted if the thread state did change. */
+extern void finish_thread_state (ptid_t ptid);
+
+/* Same as FINISH_THREAD_STATE, but with an interface suitable to be
+ registered as a cleanup. PTID_P points to the ptid_t that is
+ passed to FINISH_THREAD_STATE. */
+extern void finish_thread_state_cleanup (void *ptid_p);
+
/* Commands with a prefix of `thread'. */
extern struct cmd_list_element *thread_cmd_list;