Module Name: src Committed By: ryo Date: Thu Jul 9 23:43:42 UTC 2020
Modified Files: src/sys/arch/aarch64/aarch64: db_disasm.c Log Message: fix build error of /usr/sbin/crash pointed out by rjs@, thanks. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/db_disasm.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_disasm.c diff -u src/sys/arch/aarch64/aarch64/db_disasm.c:1.9 src/sys/arch/aarch64/aarch64/db_disasm.c:1.10 --- src/sys/arch/aarch64/aarch64/db_disasm.c:1.9 Wed Jul 8 03:45:13 2020 +++ src/sys/arch/aarch64/aarch64/db_disasm.c Thu Jul 9 23:43:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.9 2020/07/08 03:45:13 ryo Exp $ */ +/* $NetBSD: db_disasm.c,v 1.10 2020/07/09 23:43:41 ryo Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu <r...@nerv.org> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.9 2020/07/08 03:45:13 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.10 2020/07/09 23:43:41 ryo Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd32.h" @@ -78,6 +78,7 @@ static char strdisasm_buf[256]; static uint32_t strdisasm_readword(uintptr_t address) { +#ifdef _KERNEL /* * if it cannot be read due to a EFAULT etc., * ignores the error and returns 0 @@ -96,6 +97,9 @@ strdisasm_readword(uintptr_t address) } return word; +#else + return *(uint32_t *)address; +#endif } static void __printflike(1, 2)