summaryrefslogtreecommitdiff
path: root/gdb/gdbthread.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-06-28 16:34:02 +0000
committerPedro Alves <palves@redhat.com>2012-06-28 16:34:02 +0000
commit8f9fc88f581b701c626e3fb68bc45e8683a38d12 (patch)
treeae8597a63667d67fd2799d54bb4b3758e41046b2 /gdb/gdbthread.h
parent92da80107676034252b6c1313d186fddf30a6088 (diff)
downloadgdb-8f9fc88f581b701c626e3fb68bc45e8683a38d12.tar.gz
gdb/
2012-06-28 Jan Kratochvil <jan.kratochvil@redhat.com> Pedro Alves <palves@redhat.com> * gdbthread.h (ALL_THREADS): New macro. (thread_list): Declare. * infrun.c (handle_inferior_event) <spurious signal>: Don't keep going, but instead fall through to the stepping handling. * linux-nat.c (resume_lwp): New parameter 'signo'. Resume with the passed in signal. Adjust debug output. (resume_callback): Rename to ... (linux_nat_resume_callback): ... this. Pass the thread's last stop signal, if in "pass" state. (linux_nat_resume): Adjust to rename. (stop_wait_callback): New assertion. Don't respawn signals; instead let the LWP remain with SIGNALLED set. (linux_nat_wait_1): Remove flushing of pending SIGSTOPs. * remote.c (append_pending_thread_resumptions): New. (remote_vcont_resume): Call it. * target.h (target_resume): Extend comment. gdb/testsuite/ 2012-06-28 Jan Kratochvil <jan.kratochvil@redhat.com> Pedro Alves <palves@redhat.com> * gdb.threads/siginfo-threads.exp: New file. * gdb.threads/siginfo-threads.c: New file. * gdb.threads/sigstep-threads.exp: New file. * gdb.threads/sigstep-threads.c: New file.
Diffstat (limited to 'gdb/gdbthread.h')
-rw-r--r--gdb/gdbthread.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 7cd66b603e7..02505559d6c 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -301,6 +301,11 @@ void thread_change_ptid (ptid_t old_ptid, ptid_t new_ptid);
typedef int (*thread_callback_func) (struct thread_info *, void *);
extern struct thread_info *iterate_over_threads (thread_callback_func, void *);
+/* Traverse all threads. */
+
+#define ALL_THREADS(T) \
+ for (T = thread_list; T; T = T->next)
+
extern int thread_count (void);
/* Switch from one thread to another. */
@@ -391,4 +396,6 @@ extern struct thread_info* inferior_thread (void);
extern void update_thread_list (void);
+extern struct thread_info *thread_list;
+
#endif /* GDBTHREAD_H */