summaryrefslogtreecommitdiff
path: root/devel/gdb/files/patch-gdb-fbsd-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'devel/gdb/files/patch-gdb-fbsd-nat.c')
-rw-r--r--devel/gdb/files/patch-gdb-fbsd-nat.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/devel/gdb/files/patch-gdb-fbsd-nat.c b/devel/gdb/files/patch-gdb-fbsd-nat.c
new file mode 100644
index 000000000000..07a224e09d09
--- /dev/null
+++ b/devel/gdb/files/patch-gdb-fbsd-nat.c
@@ -0,0 +1,17 @@
+--- gdb/fbsd-nat.c.orig 2016-03-14 00:00:11.831889802 +0100
++++ gdb/fbsd-nat.c 2016-03-14 00:04:35.906871361 +0100
+@@ -471,6 +471,14 @@
+ ptid_get_tid (ptid));
+ if (ptid_lwp_p (ptid))
+ {
++#ifndef PT_LWP_EVENTS
++ /* When LWP events are not supported, a new thread might already be
++ running that has not yet reported an event when GDB wishes to
++ only run a single thread. Force an update of the thread list
++ to ensure that any such threads are suspended before the process
++ is resumed. */
++ fbsd_add_threads (ptid_get_pid (ptid));
++#endif
+ /* If ptid is a specific LWP, suspend all other LWPs in the process. */
+ iterate_over_threads (resume_one_thread_cb, &ptid);
+ }