Fri Dec 1 22:15:17 2017 UTC ()
get the debugging registers for the specific thread.


(christos)
diff -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c

cvs diff -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c (expand / switch to context diff)
--- src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c 2017/11/28 22:04:53 1.2
+++ src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c 2017/12/01 22:15:17 1.3
@@ -82,7 +82,7 @@
   struct dbreg dbregs;
 
   if (ptrace (PT_GETDBREGS, get_ptrace_pid (inferior_ptid),
-              (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
+              (PTRACE_TYPE_ARG3) &dbregs, ptid_get_lwp (inferior_ptid)) == -1)
     perror_with_name (_("Couldn't get debug registers"));
 
   /* For some mysterious reason, some of the reserved bits in the
@@ -96,7 +96,7 @@
     if (thread->inf == current_inferior ())
       {
 	if (ptrace (PT_SETDBREGS, get_ptrace_pid (thread->ptid),
-		    (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
+		    (PTRACE_TYPE_ARG3) &dbregs, ptid_get_lwp (inferior_ptid)) == -1)
 	  perror_with_name (_("Couldn't write debug registers"));
       }
 }