/* 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.
at. */
bpstat stop_bpstat;
+ /* True if this thread has been explicitly requested to stop. */
+ int stop_requested;
+
/* Private data used by the target vector implementation. */
struct private_thread_info *private;
};
If PIDGET (PTID) is -1, marks all threads. */
extern void set_running (ptid_t ptid, int running);
+/* Marks or clears thread(s) PTID as having been requested to stop.
+ If PTID is MINUS_ONE_PTID, applies to all threads. If
+ ptid_is_pid(PTID) is true, applies to all threads of the process
+ pointed at by PTID. If STOP, then the THREAD_STOP_REQUESTED
+ observer is called with PTID as argument. */
+extern void set_stop_requested (ptid_t ptid, int stop);
+
/* NOTE: Since the thread state is not a boolean, most times, you do
not want to check it with negation. If you really want to check if
the thread is stopped,
/* 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;
`set print thread-events'. */
extern int print_thread_events;
-extern void print_thread_info (struct ui_out *uiout, int thread);
+extern void print_thread_info (struct ui_out *uiout, int thread,
+ int pid);
extern struct cleanup *make_cleanup_restore_current_thread (void);