Module Name: src Committed By: mrg Date: Wed Sep 23 09:56:33 UTC 2020
Modified Files: src/sys/arch/mips/mips: mips_stacktrace.c Log Message: make !DDB kernels build. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/mips/mips_stacktrace.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/mips/mips/mips_stacktrace.c diff -u src/sys/arch/mips/mips/mips_stacktrace.c:1.5 src/sys/arch/mips/mips/mips_stacktrace.c:1.6 --- src/sys/arch/mips/mips/mips_stacktrace.c:1.5 Wed Sep 23 09:52:02 2020 +++ src/sys/arch/mips/mips/mips_stacktrace.c Wed Sep 23 09:56:33 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_stacktrace.c,v 1.5 2020/09/23 09:52:02 simonb Exp $ */ +/* $NetBSD: mips_stacktrace.c,v 1.6 2020/09/23 09:56:33 mrg Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.5 2020/09/23 09:52:02 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.6 2020/09/23 09:56:33 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: mips_stacktr #include <mips/locore.h> #include <mips/mips_opcode.h> +#include <mips/regnum.h> #include <mips/stacktrace.h> #if defined(_KMEMUSER) && !defined(DDB) @@ -228,13 +229,13 @@ kdbrpeek(vaddr_t addr, size_t n) } else { if (sizeof(mips_reg_t) == 8 && n == 8) #if _KERNEL - db_read_bytes((db_addr_t)addr, sizeof(int64_t), (char *)&rc); - else - db_read_bytes((db_addr_t)addr, sizeof(int32_t), (char *)&rc); -#else rc = *(int64_t *)addr; else rc = *(int32_t *)addr; +#else + db_read_bytes((db_addr_t)addr, sizeof(int64_t), (char *)&rc); + else + db_read_bytes((db_addr_t)addr, sizeof(int32_t), (char *)&rc); #endif } return rc;