From 37d4245424b72ac0c2a7b7df455732ed04e8f0eb Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 1 Dec 2017 22:22:40 +0000 Subject: [PATCH] don't suspend other threads if we are resuming. --- external/gpl3/gdb/dist/gdb/nbsd-nat.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/external/gpl3/gdb/dist/gdb/nbsd-nat.c b/external/gpl3/gdb/dist/gdb/nbsd-nat.c index 16e5ffb08bf9..922b15c9b49b 100644 --- a/external/gpl3/gdb/dist/gdb/nbsd-nat.c +++ b/external/gpl3/gdb/dist/gdb/nbsd-nat.c @@ -556,7 +556,12 @@ nbsd_resume (struct target_ops *ops, ptid_get_tid (ptid)); if (ptid_lwp_p (ptid)) { - /* If ptid is a specific LWP, suspend all other LWPs in the process. */ + /* FreeBSD: If ptid is a specific LWP, suspend all other LWPs in the + * process. + */ + /* NetBSD, this function is about resuming so we only deal with + * the thread we've been asked to work with + */ struct thread_info *tp; int request; @@ -567,8 +572,10 @@ nbsd_resume (struct target_ops *ops, if (ptid_get_lwp (tp->ptid) == ptid_get_lwp (ptid)) request = PT_RESUME; +#ifndef __NetBSD__ else request = PT_SUSPEND; +#endif if (ptrace (request, ptid_get_pid (tp->ptid), NULL, ptid_get_lwp (tp->ptid)) == -1)