summaryrefslogtreecommitdiff
path: root/devel/gdb/files/patch-gdb_amd64-bsd-nat.c
diff options
context:
space:
mode:
authorLuca Pizzamiglio <pizzamig@FreeBSD.org>2020-12-04 23:19:27 +0000
committerLuca Pizzamiglio <pizzamig@FreeBSD.org>2020-12-04 23:19:27 +0000
commit2c2f3a710a6f3dec972ceb92c3f93fca455f24ef (patch)
treea3d10eaf69e63147e80b94737e8decf03b639c29 /devel/gdb/files/patch-gdb_amd64-bsd-nat.c
parentwww/youtube_dl: update to 2020.12.05 (diff)
devel/gdb: Update to 10.1
Reviewed by: jhb@ Differential Revision: https://reviews.freebsd.org/D27040
Notes
Notes: svn path=/head/; revision=557028
Diffstat (limited to 'devel/gdb/files/patch-gdb_amd64-bsd-nat.c')
-rw-r--r--devel/gdb/files/patch-gdb_amd64-bsd-nat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/devel/gdb/files/patch-gdb_amd64-bsd-nat.c b/devel/gdb/files/patch-gdb_amd64-bsd-nat.c
index 1f16ba316a40..4213a2a504d5 100644
--- a/devel/gdb/files/patch-gdb_amd64-bsd-nat.c
+++ b/devel/gdb/files/patch-gdb_amd64-bsd-nat.c
@@ -14,17 +14,17 @@
struct reg regs;
+ register_t old_rflags;
- if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ if (gdb_ptrace (PT_GETREGS, ptid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name (_("Couldn't get registers"));
+ old_rflags = regs.r_rflags;
amd64_collect_native_gregset (regcache, &regs, regnum);
-+ /* This is a workaround about the PSL_USERCHANGE posix limitation. */
++ /* This is a workaround about the PSL_USERCHANGE posix limitation. */
+ if ((regs.r_rflags ^ old_rflags ) & ~PSL_USERCHANGE)
+ {
+ regs.r_rflags ^= (regs.r_rflags ^ old_rflags ) & ~PSL_USERCHANGE;
+ }
- if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ if (gdb_ptrace (PT_SETREGS, ptid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name (_("Couldn't write registers"));