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 PR/47430: Fix debugging threads a...
details: https://anonhg.NetBSD.org/src/rev/e704548eaaa2
branches: trunk
changeset: 330607:e704548eaaa2
user: christos <christos%NetBSD.org@localhost>
date: Tue Jul 15 17:35:54 2014 +0000
description:
PR/47430: Fix debugging threads again, GETTID == ptid_get_lwp for us, not
ptid_get_tid :-)
diffstat:
external/gpl3/gdb/dist/gdb/amd64bsd-nat.c | 12 ++++++------
external/gpl3/gdb/dist/gdb/armnbsd-nat.c | 20 ++++++++++----------
external/gpl3/gdb/dist/gdb/hppanbsd-nat.c | 12 ++++++------
external/gpl3/gdb/dist/gdb/i386bsd-nat.c | 24 ++++++++++++------------
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 | 20 ++++++++++----------
external/gpl3/gdb/dist/gdb/shnbsd-nat.c | 10 +++++-----
external/gpl3/gdb/dist/gdb/sparc-nat.c | 12 ++++++------
external/gpl3/gdb/dist/gdb/vaxbsd-nat.c | 4 ++--
10 files changed, 69 insertions(+), 69 deletions(-)
diffs (truncated from 624 to 300 lines):
diff -r 3cd3a29bc90c -r e704548eaaa2 external/gpl3/gdb/dist/gdb/amd64bsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/amd64bsd-nat.c Tue Jul 15 17:35:39 2014 +0000
+++ b/external/gpl3/gdb/dist/gdb/amd64bsd-nat.c Tue Jul 15 17:35:54 2014 +0000
@@ -47,7 +47,7 @@
struct reg regs;
if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) ®s, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get registers"));
amd64_supply_native_gregset (regcache, ®s, -1);
@@ -60,7 +60,7 @@
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get floating point status"));
amd64_supply_fxsave (regcache, -1, &fpregs);
@@ -81,13 +81,13 @@
struct reg regs;
if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) ®s, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get registers"));
amd64_collect_native_gregset (regcache, ®s, regnum);
if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) ®s, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't write registers"));
if (regnum != -1)
@@ -99,13 +99,13 @@
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get floating point status"));
amd64_collect_fxsave (regcache, regnum, &fpregs);
if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't write floating point status"));
}
}
diff -r 3cd3a29bc90c -r e704548eaaa2 external/gpl3/gdb/dist/gdb/armnbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/armnbsd-nat.c Tue Jul 15 17:35:39 2014 +0000
+++ b/external/gpl3/gdb/dist/gdb/armnbsd-nat.c Tue Jul 15 17:35:54 2014 +0000
@@ -202,7 +202,7 @@
int ret;
ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
{
@@ -255,7 +255,7 @@
int regno;
ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
{
@@ -273,7 +273,7 @@
int ret;
ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
{
@@ -303,7 +303,7 @@
int regno;
ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
{
@@ -341,7 +341,7 @@
int ret;
ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
{
@@ -404,7 +404,7 @@
}
ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
warning (_("unable to write register %d to inferior"), regno);
@@ -452,7 +452,7 @@
}
ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
warning (_("unable to store general registers"));
@@ -465,7 +465,7 @@
int ret;
ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
{
@@ -488,7 +488,7 @@
}
ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
warning (_("unable to write register %d to inferior"), regno);
@@ -511,7 +511,7 @@
(char *) &inferior_fp_registers.fpr_vfp.vfp_fpscr);
ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_tid (inferior_ptid));
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid));
if (ret < 0)
warning (_("unable to store floating-point registers"));
diff -r 3cd3a29bc90c -r e704548eaaa2 external/gpl3/gdb/dist/gdb/hppanbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c Tue Jul 15 17:35:39 2014 +0000
+++ b/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c Tue Jul 15 17:35:54 2014 +0000
@@ -178,7 +178,7 @@
struct reg regs;
if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) ®s, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get registers"));
hppanbsd_supply_gregset (regcache, ®s);
@@ -189,7 +189,7 @@
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get floating point status"));
hppanbsd_supply_fpregset (regcache, &fpregs);
@@ -208,13 +208,13 @@
struct reg regs;
if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) ®s, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get registers"));
hppanbsd_collect_gregset (regcache, ®s, regnum);
if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) ®s, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't write registers"));
}
@@ -223,13 +223,13 @@
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get floating point status"));
hppanbsd_collect_fpregset (regcache, &fpregs, regnum);
if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't write floating point status"));
}
}
diff -r 3cd3a29bc90c -r e704548eaaa2 external/gpl3/gdb/dist/gdb/i386bsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/i386bsd-nat.c Tue Jul 15 17:35:39 2014 +0000
+++ b/external/gpl3/gdb/dist/gdb/i386bsd-nat.c Tue Jul 15 17:35:54 2014 +0000
@@ -137,7 +137,7 @@
struct reg regs;
if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) ®s, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get registers"));
i386bsd_supply_gregset (regcache, ®s);
@@ -153,7 +153,7 @@
if (have_ptrace_xmmregs != 0
&& ptrace(PT_GETXMMREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) xmmregs, ptid_get_tid (inferior_ptid)) == 0)
+ (PTRACE_TYPE_ARG3) xmmregs, ptid_get_lwp (inferior_ptid)) == 0)
{
have_ptrace_xmmregs = 1;
i387_supply_fxsave (regcache, -1, xmmregs);
@@ -161,14 +161,14 @@
else
{
if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get floating point status"));
i387_supply_fsave (regcache, -1, &fpregs);
}
#else
if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get floating point status"));
i387_supply_fsave (regcache, -1, &fpregs);
@@ -188,13 +188,13 @@
struct reg regs;
if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) ®s, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get registers"));
i386bsd_collect_gregset (regcache, ®s, regnum);
if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) ®s, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't write registers"));
if (regnum != -1)
@@ -209,14 +209,14 @@
if (have_ptrace_xmmregs != 0
&& ptrace(PT_GETXMMREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) xmmregs, ptid_get_tid (inferior_ptid)) == 0)
+ (PTRACE_TYPE_ARG3) xmmregs, ptid_get_lwp (inferior_ptid)) == 0)
{
have_ptrace_xmmregs = 1;
i387_collect_fxsave (regcache, regnum, xmmregs);
if (ptrace (PT_SETXMMREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) xmmregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) xmmregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't write XMM registers"));
}
else
@@ -224,13 +224,13 @@
have_ptrace_xmmregs = 0;
#endif
if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't get floating point status"));
i387_collect_fsave (regcache, regnum, &fpregs);
if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &fpregs, ptid_get_tid (inferior_ptid)) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
perror_with_name (_("Couldn't write floating point status"));
#ifdef HAVE_PT_GETXMMREGS
}
@@ -281,7 +281,7 @@
struct dbreg dbregs;
if (ptrace (PT_GETDBREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &dbregs, ptid_get_tid (inferior_ptid)) == -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
@@ -292,7 +292,7 @@
DBREG_DRX ((&dbregs), regnum) = value;
if (ptrace (PT_SETDBREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) &dbregs, ptid_get_tid (inferior_ptid)) == -1)
Home |
Main Index |
Thread Index |
Old Index