summaryrefslogtreecommitdiff
path: root/gdb/gdbthread.h
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-10-23 23:11:20 +0000
committerPedro Alves <pedro@codesourcery.com>2008-10-23 23:11:20 +0000
commit87f7f592fde334c6d2dfaa0131c5001e18ac83b5 (patch)
treee3edfb3379ee6fba7a3e9453a88424dff9d3d6a4 /gdb/gdbthread.h
parentda8ec41ebb251261a2bdd521b20e04574947726f (diff)
downloadgdb-87f7f592fde334c6d2dfaa0131c5001e18ac83b5.tar.gz
gdb/
2008-10-23 Pedro Alves <pedro@codesourcery.com> * defs.h: Mention ptid_is_pid. * inferior.h (ptid_is_pid): Declare. * gdbthread.h (struct thread_info) <stop_requested>: New field. (set_stop_requested): Declare. * infcmd.c (interrupt_target_1): Call set_stop_requested. * infrun.c (clear_proceed_status): Clear stop_requested. (infrun_thread_stop_requested_callback, infrun_thread_stop_requested): New. (handle_inferior_event): If a TARGET_SIGNAL_TRAP is reported on a thread that had an explicit stop request, pretend we got a TARGET_SIGNAL_0. Always stop if the thread had an explicit stop request. (print_stop_reason): In the SIGNAL_RECEIVED case, if we're not outputting to MI, and we got a TARGET_SIGNAL_0, print "# Stopped", instead of mentioning signal 0. (ptid_is_pid): New. * thread.c (set_stop_requested): New. * linux-nat.c (queued_waitpid): Rename to ... (queued_waitpid_1): ... this. Add `peek' argument. Handle it. (queued_waitpid): New, as wrapper to queued_waitpid_1. (push_waitpid): Push the SIGTRAP to the local event queue, to the kernel's. (send_sigint_callback): Delete. (linux_nat_stop_lwp): New. (linux_nat_stop): Use it. gdb/doc/ 2008-10-23 Pedro Alves <pedro@codesourcery.com> * observer.texi (thread_stop_requested): New. gdb/testsuite/ 2008-10-23 Pedro Alves <pedro@codesourcery.com> * lib/mi-support.exp (mi_expect_interrupt): Expect signal 0 instead of SIGINT.
Diffstat (limited to 'gdb/gdbthread.h')
-rw-r--r--gdb/gdbthread.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 0fb53fbbc4a..55c848df2a4 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -168,6 +168,9 @@ struct thread_info
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;
};
@@ -239,6 +242,13 @@ extern void switch_to_thread (ptid_t ptid);
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,