Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb don't suspend other threads if we...



details:   https://anonhg.NetBSD.org/src/rev/8b4b1543cb00
branches:  trunk
changeset: 357894:8b4b1543cb00
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 01 22:22:40 2017 +0000

description:
don't suspend other threads if we are resuming.

diffstat:

 external/gpl3/gdb/dist/gdb/nbsd-nat.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 21fa838af626 -r 8b4b1543cb00 external/gpl3/gdb/dist/gdb/nbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/nbsd-nat.c     Fri Dec 01 22:20:44 2017 +0000
+++ b/external/gpl3/gdb/dist/gdb/nbsd-nat.c     Fri Dec 01 22:22:40 2017 +0000
@@ -556,7 +556,12 @@
                        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 @@
 
          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)



Home | Main Index | Thread Index | Old Index