Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Nov 2021 08:28:18 GMT
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3be6e606d787 - main - linux: Fix another amd64-specific piece of linux_ptrace.c
Message-ID:  <202111060828.1A68SIDs058501@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by trasz:

URL: https://cgit.FreeBSD.org/src/commit/?id=3be6e606d7870a79baa7a4c5947dffd333defa79

commit 3be6e606d7870a79baa7a4c5947dffd333defa79
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-11-06 07:56:51 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2021-11-06 08:28:11 +0000

    linux: Fix another amd64-specific piece of linux_ptrace.c
    
    This was missed in c91d0e59be1.  No functional changes.
    
    Sponsored By:   EPSRC
---
 sys/amd64/linux/linux_ptrace.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c
index 2ebf1c2be997..5910e4ec3d4f 100644
--- a/sys/amd64/linux/linux_ptrace.c
+++ b/sys/amd64/linux/linux_ptrace.c
@@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$");
 
 #include <machine/pcb.h>
 
-#include <amd64/linux/linux.h>
-#include <amd64/linux/linux_proto.h>
+#include <machine/../linux/linux.h>
+#include <machine/../linux/linux_proto.h>
 #include <compat/linux/linux_emul.h>
 #include <compat/linux/linux_errno.h>
 #include <compat/linux/linux_misc.h>
@@ -343,10 +343,10 @@ linux_ptrace_getsiginfo(struct thread *td, pid_t pid, l_ulong data)
 static int
 linux_ptrace_getregs(struct thread *td, pid_t pid, void *data)
 {
-	struct ptrace_lwpinfo lwpinfo;
 	struct reg b_reg;
 	struct linux_pt_regset l_regset;
 #ifdef __amd64__
+	struct ptrace_lwpinfo lwpinfo;
 	struct pcb *pcb;
 #endif
 	int error;
@@ -364,7 +364,6 @@ linux_ptrace_getregs(struct thread *td, pid_t pid, void *data)
 
 	l_regset.fs_base = pcb->pcb_fsbase;
 	l_regset.gs_base = pcb->pcb_gsbase;
-#endif
 
 	error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo));
 	if (error != 0) {
@@ -385,6 +384,7 @@ linux_ptrace_getregs(struct thread *td, pid_t pid, void *data)
 		 */
 		l_regset.orig_rax = lwpinfo.pl_syscall_code;
 	}
+#endif
 
 	error = copyout(&l_regset, (void *)data, sizeof(l_regset));
 	return (error);
@@ -408,11 +408,11 @@ linux_ptrace_setregs(struct thread *td, pid_t pid, void *data)
 static int
 linux_ptrace_getregset_prstatus(struct thread *td, pid_t pid, l_ulong data)
 {
-	struct ptrace_lwpinfo lwpinfo;
 	struct reg b_reg;
 	struct linux_pt_regset l_regset;
 	struct iovec iov;
 #ifdef __amd64__
+	struct ptrace_lwpinfo lwpinfo;
 	struct pcb *pcb;
 #endif
 	size_t len;
@@ -437,7 +437,6 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid_t pid, l_ulong data)
 
 	l_regset.fs_base = pcb->pcb_fsbase;
 	l_regset.gs_base = pcb->pcb_gsbase;
-#endif
 
 	error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo));
 	if (error != 0) {
@@ -459,6 +458,7 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid_t pid, l_ulong data)
 		 */
 		l_regset.orig_rax = lwpinfo.pl_syscall_code;
 	}
+#endif
 
 	len = MIN(iov.iov_len, sizeof(l_regset));
 	error = copyout(&l_regset, (void *)iov.iov_base, len);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111060828.1A68SIDs058501>