Module Name: src Committed By: skrll Date: Sun Jan 22 20:27:28 UTC 2012
Modified Files: src/external/gpl3/gdb/dist/gdb: armnbsd-nat.c hppanbsd-nat.c m68kbsd-nat.c mipsnbsd-nat.c ppcnbsd-nat.c sparc-nat.c vaxbsd-nat.c Log Message: Pass the lwp id as the 4th arg to ptrace. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c \ src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c \ src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c \ src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c \ src/external/gpl3/gdb/dist/gdb/sparc-nat.c cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/vaxbsd-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/armnbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.3 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.4 --- src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.3 Mon Oct 10 23:13:25 2011 +++ src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c Sun Jan 22 20:27:28 2012 @@ -451,7 +451,7 @@ store_fp_register (const struct regcache 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 @@ store_fp_register (const struct regcache } 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 @@ store_fp_regs (const struct regcache *re (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")); Index: src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.3 src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.4 --- src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.3 Tue Oct 11 23:04:21 2011 +++ src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c Sun Jan 22 20:27:28 2012 @@ -119,7 +119,7 @@ m68kbsd_fetch_inferior_registers (struct struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); m68kbsd_supply_gregset (regcache, ®s); @@ -130,7 +130,7 @@ m68kbsd_fetch_inferior_registers (struct 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 @@ m68kbsd_store_inferior_registers (struct struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); m68kbsd_collect_gregset (regcache, ®s, regnum); if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't write registers")); } @@ -164,13 +164,13 @@ m68kbsd_store_inferior_registers (struct 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")); } } Index: src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.3 src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.4 --- src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.3 Sun Oct 9 02:07:24 2011 +++ src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c Sun Jan 22 20:27:28 2012 @@ -90,7 +90,7 @@ ppcnbsd_fetch_inferior_registers (struct struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); ppc_supply_gregset (&ppcnbsd_gregset, regcache, @@ -102,7 +102,7 @@ ppcnbsd_fetch_inferior_registers (struct 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 @@ ppcnbsd_store_inferior_registers (struct struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); ppc_collect_gregset (&ppcnbsd_gregset, regcache, regnum, ®s, sizeof regs); if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't write registers")); } @@ -137,14 +137,14 @@ ppcnbsd_store_inferior_registers (struct 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")); } } Index: src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.2 --- src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.1.1.1 Sat Sep 24 20:10:38 2011 +++ src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c Sun Jan 22 20:27:28 2012 @@ -168,7 +168,7 @@ hppanbsd_fetch_registers (struct target_ struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); hppanbsd_supply_gregset (regcache, ®s); @@ -179,7 +179,7 @@ hppanbsd_fetch_registers (struct target_ 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 @@ hppanbsd_store_registers (struct target_ struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); hppanbsd_collect_gregset (regcache, ®s, regnum); if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't write registers")); } @@ -213,13 +213,13 @@ hppanbsd_store_registers (struct target_ 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")); } } Index: src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.2 --- src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.1.1.1 Sat Sep 24 20:11:33 2011 +++ src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c Sun Jan 22 20:27:28 2012 @@ -49,7 +49,7 @@ mipsnbsd_fetch_inferior_registers (struc struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); mipsnbsd_supply_reg (regcache, (char *) ®s, regno); @@ -63,7 +63,7 @@ mipsnbsd_fetch_inferior_registers (struc 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 @@ mipsnbsd_store_inferior_registers (struc struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); mipsnbsd_fill_reg (regcache, (char *) ®s, regno); if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid).) == -1) perror_with_name (_("Couldn't write registers")); if (regno != -1) @@ -99,13 +99,13 @@ mipsnbsd_store_inferior_registers (struc 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")); } } Index: src/external/gpl3/gdb/dist/gdb/sparc-nat.c diff -u src/external/gpl3/gdb/dist/gdb/sparc-nat.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/sparc-nat.c:1.2 --- src/external/gpl3/gdb/dist/gdb/sparc-nat.c:1.1.1.1 Sat Sep 24 20:12:31 2011 +++ src/external/gpl3/gdb/dist/gdb/sparc-nat.c Sun Jan 22 20:27:28 2012 @@ -167,7 +167,7 @@ sparc_fetch_inferior_registers (struct t { gregset_t regs; - if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); sparc_supply_gregset (sparc_gregset, regcache, -1, ®s); @@ -179,7 +179,7 @@ sparc_fetch_inferior_registers (struct t { 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 @@ sparc_store_inferior_registers (struct t { gregset_t regs; - if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); sparc_collect_gregset (sparc_gregset, regcache, regnum, ®s); - if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't write registers")); /* Deal with the stack regs. */ @@ -229,7 +229,7 @@ sparc_store_inferior_registers (struct t { 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 @@ sparc_store_inferior_registers (struct t 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")); } Index: src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c:1.3 --- src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c:1.2 Sun Sep 25 16:30:25 2011 +++ src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c Sun Jan 22 20:27:28 2012 @@ -71,7 +71,7 @@ vaxbsd_fetch_inferior_registers (struct struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); vaxbsd_supply_gregset (regcache, ®s); @@ -87,13 +87,13 @@ vaxbsd_store_inferior_registers (struct struct reg regs; if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't get registers")); vaxbsd_collect_gregset (regcache, ®s, regnum); if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), - (PTRACE_TYPE_ARG3) ®s, 0) == -1) + (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) perror_with_name (_("Couldn't write registers")); }