Module Name: src Committed By: ryo Date: Thu May 26 17:11:05 UTC 2022
Modified Files: src/sys/arch/aarch64/aarch64: db_interface.c Log Message: In ddb, fixed "trace/u" and user process memory read/write to work correctly. In the softint context, curlwp points the kernel lwp, so to get the pmap of a user process, we had to use curcpu()->ci_onproc->l_proc instead of curproc (curlwp->l_proc). Adviced by ad@. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/aarch64/aarch64/db_interface.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/arch/aarch64/aarch64/db_interface.c diff -u src/sys/arch/aarch64/aarch64/db_interface.c:1.16 src/sys/arch/aarch64/aarch64/db_interface.c:1.17 --- src/sys/arch/aarch64/aarch64/db_interface.c:1.16 Wed May 19 12:16:01 2021 +++ src/sys/arch/aarch64/aarch64/db_interface.c Thu May 26 17:11:05 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.16 2021/05/19 12:16:01 skrll Exp $ */ +/* $NetBSD: db_interface.c,v 1.17 2022/05/26 17:11:05 ryo Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu <r...@nerv.org> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.16 2021/05/19 12:16:01 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.17 2022/05/26 17:11:05 ryo Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -60,7 +60,7 @@ db_regs_t ddb_regs; static int db_validate_address(vaddr_t addr) { - struct proc *p = curproc; + struct proc *p = curcpu()->ci_onproc->l_proc; struct pmap *pmap; if (!p || !p->p_vmspace || !p->p_vmspace->vm_map.pmap ||