Source-Changes-HG archive

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

[src/trunk]: src/gnu/dist/gdb/gdb Pass the LWP of the ptid in PT_{GET, SET}REG...



details:   https://anonhg.NetBSD.org/src/rev/c10d3af6dd49
branches:  trunk
changeset: 553500:c10d3af6dd49
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Sat Oct 18 00:13:35 2003 +0000

description:
Pass the LWP of the ptid in PT_{GET,SET}REGS calls.

diffstat:

 gnu/dist/gdb/gdb/i386bsd-nat.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (87 lines):

diff -r 555e56b8b3d4 -r c10d3af6dd49 gnu/dist/gdb/gdb/i386bsd-nat.c
--- a/gnu/dist/gdb/gdb/i386bsd-nat.c    Sat Oct 18 00:11:51 2003 +0000
+++ b/gnu/dist/gdb/gdb/i386bsd-nat.c    Sat Oct 18 00:13:35 2003 +0000
@@ -182,7 +182,7 @@
       gregset_t gregs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+                 (PTRACE_ARG3_TYPE) &gregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name ("Couldn't get registers");
 
       supply_gregset (&gregs);
@@ -198,7 +198,7 @@
 
       if (have_ptrace_xmmregs != 0 &&
          ptrace(PT_GETXMMREGS, PIDGET (inferior_ptid),
-                (PTRACE_ARG3_TYPE) xmmregs, 0) == 0)
+                (PTRACE_ARG3_TYPE) xmmregs, TIDGET (inferior_ptid)) == 0)
        {
          have_ptrace_xmmregs = 1;
          i387_supply_fxsave (xmmregs);
@@ -206,14 +206,14 @@
       else
        {
           if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                     (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+                     (PTRACE_ARG3_TYPE) &fpregs, TIDGET (inferior_ptid)) == -1)
            perror_with_name ("Couldn't get floating point status");
 
          supply_fpregset (&fpregs);
        }
 #else
       if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+                 (PTRACE_ARG3_TYPE) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name ("Couldn't get floating point status");
 
       supply_fpregset (&fpregs);
@@ -233,13 +233,13 @@
       gregset_t gregs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                  (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+                  (PTRACE_ARG3_TYPE) &gregs, TIDGET (inferior_ptid)) == -1)
         perror_with_name ("Couldn't get registers");
 
       fill_gregset (&gregs, regno);
 
       if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+                 (PTRACE_ARG3_TYPE) &gregs, TIDGET (inferior_ptid)) == -1)
         perror_with_name ("Couldn't write registers");
 
       if (regno != -1)
@@ -254,14 +254,14 @@
 
       if (have_ptrace_xmmregs != 0 &&
          ptrace(PT_GETXMMREGS, PIDGET (inferior_ptid),
-                (PTRACE_ARG3_TYPE) xmmregs, 0) == 0)
+                (PTRACE_ARG3_TYPE) xmmregs, TIDGET (inferior_ptid)) == 0)
        {
          have_ptrace_xmmregs = 1;
 
          i387_fill_fxsave (xmmregs, regno);
 
          if (ptrace (PT_SETXMMREGS, PIDGET (inferior_ptid),
-                     (PTRACE_ARG3_TYPE) xmmregs, 0) == -1)
+                     (PTRACE_ARG3_TYPE) xmmregs, TIDGET (inferior_ptid)) == -1)
             perror_with_name ("Couldn't write XMM registers");
        }
       else
@@ -269,13 +269,13 @@
          have_ptrace_xmmregs = 0;
 #endif
           if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                     (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+                     (PTRACE_ARG3_TYPE) &fpregs, TIDGET (inferior_ptid)) == -1)
            perror_with_name ("Couldn't get floating point status");
 
           fill_fpregset (&fpregs, regno);
   
           if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
-                     (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+                     (PTRACE_ARG3_TYPE) &fpregs, TIDGET (inferior_ptid)) == -1)
            perror_with_name ("Couldn't write floating point status");
 #ifdef HAVE_PT_GETXMMREGS
         }



Home | Main Index | Thread Index | Old Index