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 Pass the lwp id as the 4th arg to...



details:   https://anonhg.NetBSD.org/src/rev/2c46385114b8
branches:  trunk
changeset: 772976:2c46385114b8
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Jan 22 20:27:28 2012 +0000

description:
Pass the lwp id as the 4th arg to ptrace.

diffstat:

 external/gpl3/gdb/dist/gdb/armnbsd-nat.c  |   6 +++---
 external/gpl3/gdb/dist/gdb/hppanbsd-nat.c |  12 ++++++------
 external/gpl3/gdb/dist/gdb/m68kbsd-nat.c  |  12 ++++++------
 external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c |  12 ++++++------
 external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c  |  12 ++++++------
 external/gpl3/gdb/dist/gdb/sparc-nat.c    |  12 ++++++------
 external/gpl3/gdb/dist/gdb/vaxbsd-nat.c   |   6 +++---
 7 files changed, 36 insertions(+), 36 deletions(-)

diffs (truncated from 326 to 300 lines):

diff -r abeb893cd40f -r 2c46385114b8 external/gpl3/gdb/dist/gdb/armnbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/armnbsd-nat.c  Sun Jan 22 20:25:25 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/armnbsd-nat.c  Sun Jan 22 20:27:28 2012 +0000
@@ -451,7 +451,7 @@
   int ret;
 
   ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-               (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
+               (PTRACE_TYPE_ARG3) &inferior_fp_registers, TIDGET (inferior_ptid));
 
   if (ret < 0)
     {
@@ -473,7 +473,7 @@
     }
 
   ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
-               (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
+               (PTRACE_TYPE_ARG3) &inferior_fp_registers, TIDGET (inferior_ptid));
 
   if (ret < 0)
     warning (_("unable to write register %d to inferior"), regno);
@@ -495,7 +495,7 @@
                        (char *) &inferior_fp_registers.fpr_fpsr);
 
   ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
-               (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
+               (PTRACE_TYPE_ARG3) &inferior_fp_registers, TIDGET (inferior_ptid));
 
   if (ret < 0)
     warning (_("unable to store floating-point registers"));
diff -r abeb893cd40f -r 2c46385114b8 external/gpl3/gdb/dist/gdb/hppanbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c Sun Jan 22 20:25:25 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c Sun Jan 22 20:27:28 2012 +0000
@@ -168,7 +168,7 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get registers"));
 
       hppanbsd_supply_gregset (regcache, &regs);
@@ -179,7 +179,7 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       hppanbsd_supply_fpregset (regcache, &fpregs);
@@ -198,13 +198,13 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                  (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
         perror_with_name (_("Couldn't get registers"));
 
       hppanbsd_collect_gregset (regcache, &regs, regnum);
 
       if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
         perror_with_name (_("Couldn't write registers"));
     }
 
@@ -213,13 +213,13 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       hppanbsd_collect_fpregset (regcache, &fpregs, regnum);
 
       if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't write floating point status"));
     }
 }
diff -r abeb893cd40f -r 2c46385114b8 external/gpl3/gdb/dist/gdb/m68kbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c  Sun Jan 22 20:25:25 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c  Sun Jan 22 20:27:28 2012 +0000
@@ -119,7 +119,7 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get registers"));
 
       m68kbsd_supply_gregset (regcache, &regs);
@@ -130,7 +130,7 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       m68kbsd_supply_fpregset (regcache, &fpregs);
@@ -149,13 +149,13 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                  (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
         perror_with_name (_("Couldn't get registers"));
 
       m68kbsd_collect_gregset (regcache, &regs, regnum);
 
       if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
         perror_with_name (_("Couldn't write registers"));
     }
 
@@ -164,13 +164,13 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       m68kbsd_collect_fpregset (regcache, &fpregs, regnum);
 
       if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't write floating point status"));
     }
 }
diff -r abeb893cd40f -r 2c46385114b8 external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c Sun Jan 22 20:25:25 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c Sun Jan 22 20:27:28 2012 +0000
@@ -49,7 +49,7 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get registers"));
       
       mipsnbsd_supply_reg (regcache, (char *) &regs, regno);
@@ -63,7 +63,7 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       mipsnbsd_supply_fpreg (regcache, (char *) &fpregs, regno);
@@ -80,13 +80,13 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get registers"));
 
       mipsnbsd_fill_reg (regcache, (char *) &regs, regno);
 
       if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), 
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid).) == -1)
        perror_with_name (_("Couldn't write registers"));
 
       if (regno != -1)
@@ -99,13 +99,13 @@
       struct fpreg fpregs; 
 
       if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       mipsnbsd_fill_fpreg (regcache, (char *) &fpregs, regno);
 
       if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't write floating point status"));
     }
 }
diff -r abeb893cd40f -r 2c46385114b8 external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c  Sun Jan 22 20:25:25 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c  Sun Jan 22 20:27:28 2012 +0000
@@ -90,7 +90,7 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
         perror_with_name (_("Couldn't get registers"));
 
       ppc_supply_gregset (&ppcnbsd_gregset, regcache,
@@ -102,7 +102,7 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get FP registers"));
 
       ppc_supply_fpregset (&ppcnbsd_fpregset, regcache,
@@ -121,14 +121,14 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get registers"));
 
       ppc_collect_gregset (&ppcnbsd_gregset, regcache,
                           regnum, &regs, sizeof regs);
 
       if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't write registers"));
     }
 
@@ -137,14 +137,14 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get FP registers"));
 
       ppc_collect_fpregset (&ppcnbsd_fpregset, regcache,
                            regnum, &fpregs, sizeof fpregs);
 
       if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't set FP registers"));
     }
 }
diff -r abeb893cd40f -r 2c46385114b8 external/gpl3/gdb/dist/gdb/sparc-nat.c
--- a/external/gpl3/gdb/dist/gdb/sparc-nat.c    Sun Jan 22 20:25:25 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/sparc-nat.c    Sun Jan 22 20:27:28 2012 +0000
@@ -167,7 +167,7 @@
     {
       gregset_t regs;
 
-      if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+      if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get registers"));
 
       sparc_supply_gregset (sparc_gregset, regcache, -1, &regs);
@@ -179,7 +179,7 @@
     {
       fpregset_t fpregs;
 
-      if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+      if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       sparc_supply_fpregset (regcache, -1, &fpregs);
@@ -203,12 +203,12 @@
     {
       gregset_t regs;
 
-      if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+      if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get registers"));
 
       sparc_collect_gregset (sparc_gregset, regcache, regnum, &regs);
 
-      if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+      if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't write registers"));
 
       /* Deal with the stack regs.  */
@@ -229,7 +229,7 @@
     {
       fpregset_t fpregs, saved_fpregs;
 
-      if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+      if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
        perror_with_name (_("Couldn't get floating-point registers"));
 
       memcpy (&saved_fpregs, &fpregs, sizeof (fpregs));
@@ -242,7 +242,7 @@
       if (memcmp (&saved_fpregs, &fpregs, sizeof (fpregs)) != 0)
        {
          if (ptrace (PTRACE_SETFPREGS, pid,
-                     (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+                     (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1)
            perror_with_name (_("Couldn't write floating-point registers"));
        }
 
diff -r abeb893cd40f -r 2c46385114b8 external/gpl3/gdb/dist/gdb/vaxbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c   Sun Jan 22 20:25:25 2012 +0000



Home | Main Index | Thread Index | Old Index