From 2c2f3a710a6f3dec972ceb92c3f93fca455f24ef Mon Sep 17 00:00:00 2001 From: Luca Pizzamiglio Date: Fri, 4 Dec 2020 23:19:27 +0000 Subject: devel/gdb: Update to 10.1 Reviewed by: jhb@ Differential Revision: https://reviews.freebsd.org/D27040 --- devel/gdb/files/patch-gdb_amd64-bsd-nat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'devel/gdb/files/patch-gdb_amd64-bsd-nat.c') 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) ®s, 0) == -1) + if (gdb_ptrace (PT_GETREGS, ptid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't get registers")); + old_rflags = regs.r_rflags; amd64_collect_native_gregset (regcache, ®s, 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) ®s, 0) == -1) + if (gdb_ptrace (PT_SETREGS, ptid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't write registers")); -- cgit v1.2.3