Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips avoid build failure on !DBB kernels.
details: https://anonhg.NetBSD.org/src/rev/4b91f146e01a
branches: trunk
changeset: 1012990:4b91f146e01a
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Aug 17 21:50:14 2020 +0000
description:
avoid build failure on !DBB kernels.
should fix arc, emips, ews4800mips, mipsco, newsmips and pmax builds.
diffstat:
sys/arch/mips/mips/mips_stacktrace.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diffs (57 lines):
diff -r cc6730bce11f -r 4b91f146e01a sys/arch/mips/mips/mips_stacktrace.c
--- a/sys/arch/mips/mips/mips_stacktrace.c Mon Aug 17 21:25:12 2020 +0000
+++ b/sys/arch/mips/mips/mips_stacktrace.c Mon Aug 17 21:50:14 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_stacktrace.c,v 1.3 2020/08/17 04:15:34 mrg Exp $ */
+/* $NetBSD: mips_stacktrace.c,v 1.4 2020/08/17 21:50:14 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.3 2020/08/17 04:15:34 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.4 2020/08/17 21:50:14 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -62,9 +62,9 @@
#ifdef DDB
#include <machine/db_machdep.h>
#include <ddb/db_sym.h>
-#endif
#include <ddb/db_user.h>
#include <ddb/db_access.h>
+#endif
#ifdef KGDB
#include <sys/kgdb.h>
@@ -201,7 +201,11 @@
printf("kdbpeek: NULL\n");
return false;
} else {
+#if _KERNEL
+ *valp = *(unsigned *)addr;
+#else
db_read_bytes((db_addr_t)addr, sizeof(unsigned), (char *)valp);
+#endif
return true;
}
}
@@ -223,9 +227,15 @@
rc = 0xdeadfeed;
} 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;
+#endif
}
return rc;
}
Home |
Main Index |
Thread Index |
Old Index