Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/aarch64 fix build error of /usr/sbin/crash



details:   https://anonhg.NetBSD.org/src/rev/5f374f90d60c
branches:  trunk
changeset: 935826:5f374f90d60c
user:      ryo <ryo%NetBSD.org@localhost>
date:      Thu Jul 09 23:43:41 2020 +0000

description:
fix build error of /usr/sbin/crash

pointed out by rjs@, thanks.

diffstat:

 sys/arch/aarch64/aarch64/db_disasm.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 71dccc458e1c -r 5f374f90d60c sys/arch/aarch64/aarch64/db_disasm.c
--- a/sys/arch/aarch64/aarch64/db_disasm.c      Thu Jul 09 22:45:54 2020 +0000
+++ b/sys/arch/aarch64/aarch64/db_disasm.c      Thu Jul 09 23:43:41 2020 +0000
@@ -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 <ryo%nerv.org@localhost>
@@ -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 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 @@
        }
 
        return word;
+#else
+       return *(uint32_t *)address;
+#endif
 }
 
 static void __printflike(1, 2)



Home | Main Index | Thread Index | Old Index