Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64 Don't provide things that don't make sense ...
details: https://anonhg.NetBSD.org/src/rev/bebfafd5d0ca
branches: trunk
changeset: 970057:bebfafd5d0ca
user: christos <christos%NetBSD.org@localhost>
date: Tue Mar 10 15:54:52 2020 +0000
description:
Don't provide things that don't make sense in userland. We don't provide
access to registers crash(8)...
diffstat:
sys/arch/sparc64/include/db_machdep.h | 4 +++-
sys/arch/sparc64/sparc64/db_machdep.c | 6 ++++--
sys/arch/sparc64/sparc64/db_trace.c | 8 ++++++--
3 files changed, 13 insertions(+), 5 deletions(-)
diffs (102 lines):
diff -r 881c663f95fd -r bebfafd5d0ca sys/arch/sparc64/include/db_machdep.h
--- a/sys/arch/sparc64/include/db_machdep.h Tue Mar 10 13:36:07 2020 +0000
+++ b/sys/arch/sparc64/include/db_machdep.h Tue Mar 10 15:54:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.35 2017/11/06 03:47:48 christos Exp $ */
+/* $NetBSD: db_machdep.h,v 1.36 2020/03/10 15:54:52 christos Exp $ */
/*
* Mach Operating System
@@ -69,9 +69,11 @@
} db_regs_t;
/* Current CPU register state */
+#ifdef _KERNEL
#define DDB_REGS ((db_regs_t*)__UNVOLATILE(curcpu()->ci_ddb_regs))
#define DDB_TF (&DDB_REGS->db_tf)
#define DDB_FP (&DDB_REGS->db_fpstate)
+#endif
/* DDB commands not in db_interface.c */
void db_dump_ts(db_expr_t, bool, db_expr_t, const char *);
diff -r 881c663f95fd -r bebfafd5d0ca sys/arch/sparc64/sparc64/db_machdep.c
--- a/sys/arch/sparc64/sparc64/db_machdep.c Tue Mar 10 13:36:07 2020 +0000
+++ b/sys/arch/sparc64/sparc64/db_machdep.c Tue Mar 10 15:54:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.1 2012/02/18 15:56:31 christos Exp $ */
+/* $NetBSD: db_machdep.c,v 1.2 2020/03/10 15:54:52 christos Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.1 2012/02/18 15:56:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.2 2020/03/10 15:54:52 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -44,6 +44,7 @@
#include <sys/cpu.h>
#include <ddb/ddb.h>
+#ifdef _KERNEL
static int
db_sparc_charop(const struct db_variable *vp, db_expr_t *val, int opcode)
{
@@ -220,6 +221,7 @@
{ "gsr", dbregfp(gsr), db_sparc_intop, 0 },
};
const struct db_variable * const db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
+#endif
#ifndef DDB
const struct db_command db_machine_command_table[] = {
diff -r 881c663f95fd -r bebfafd5d0ca sys/arch/sparc64/sparc64/db_trace.c
--- a/sys/arch/sparc64/sparc64/db_trace.c Tue Mar 10 13:36:07 2020 +0000
+++ b/sys/arch/sparc64/sparc64/db_trace.c Tue Mar 10 15:54:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.53 2019/05/22 15:10:13 martin Exp $ */
+/* $NetBSD: db_trace.c,v 1.54 2020/03/10 15:54:52 christos Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.53 2019/05/22 15:10:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.54 2020/03/10 15:54:52 christos Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -202,6 +202,7 @@
}
+#ifdef _KERNEL
void
db_dump_window(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
{
@@ -222,6 +223,7 @@
db_printf("Window %lx ", (long)addr);
db_print_window(frame);
}
+#endif
void
db_print_window(uint64_t frame)
@@ -307,6 +309,7 @@
}
}
+#ifdef _KERNEL
void
db_dump_stack(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
{
@@ -549,3 +552,4 @@
}
}
+#endif
Home |
Main Index |
Thread Index |
Old Index