Module Name:    src
Committed By:   christos
Date:           Fri Dec  1 22:15:17 UTC 2017

Modified Files:
        src/external/gpl3/gdb/dist/gdb: x86-bsd-nat.c

Log Message:
get the debugging registers for the specific thread.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c:1.3
--- src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c:1.2	Tue Nov 28 17:04:53 2017
+++ src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c	Fri Dec  1 17:15:17 2017
@@ -82,7 +82,7 @@ x86bsd_dr_set (int regnum, unsigned long
   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 @@ x86bsd_dr_set (int regnum, unsigned long
     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"));
       }
 }

Reply via email to