Module Name: src Committed By: christos Date: Mon Jan 8 06:10:30 UTC 2018
Modified Files: src/sys/kern: sys_ptrace_common.c Log Message: Use the proper process (the tracee) to get information about lwps and registers and the tracer for vmspace. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/kern/sys_ptrace_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/sys_ptrace_common.c diff -u src/sys/kern/sys_ptrace_common.c:1.33 src/sys/kern/sys_ptrace_common.c:1.34 --- src/sys/kern/sys_ptrace_common.c:1.33 Sun Jan 7 23:45:53 2018 +++ src/sys/kern/sys_ptrace_common.c Mon Jan 8 01:10:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace_common.c,v 1.33 2018/01/08 04:45:53 christos Exp $ */ +/* $NetBSD: sys_ptrace_common.c,v 1.34 2018/01/08 06:10:30 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.33 2018/01/08 04:45:53 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.34 2018/01/08 06:10:30 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -772,7 +772,7 @@ ptrace_regs(struct lwp *l, struct lwp ** void *addr, size_t data) { int error; - struct proc *t = l->l_proc; + struct proc *t = (*lt)->l_proc; struct vmspace *vm; if ((error = ptrace_update_lwp(t, lt, data)) != 0) @@ -814,7 +814,7 @@ ptrace_regs(struct lwp *l, struct lwp ** return EINVAL; } - error = proc_vmspace_getref(t, &vm); + error = proc_vmspace_getref(l->l_proc, &vm); if (error) return error;