Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/crash/arch i386 does not have a variable min addres...
details: https://anonhg.NetBSD.org/src/rev/ae9031fb5e12
branches: trunk
changeset: 365344:ae9031fb5e12
user: christos <christos%NetBSD.org@localhost>
date: Sun Aug 12 16:00:41 2018 +0000
description:
i386 does not have a variable min address (yet)
diffstat:
usr.sbin/crash/arch/x86.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (48 lines):
diff -r 91f9ebb62d3f -r ae9031fb5e12 usr.sbin/crash/arch/x86.c
--- a/usr.sbin/crash/arch/x86.c Sun Aug 12 15:55:26 2018 +0000
+++ b/usr.sbin/crash/arch/x86.c Sun Aug 12 16:00:41 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86.c,v 1.3 2018/08/12 15:55:26 christos Exp $ */
+/* $NetBSD: x86.c,v 1.4 2018/08/12 16:00:41 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: x86.c,v 1.3 2018/08/12 15:55:26 christos Exp $");
+__RCSID("$NetBSD: x86.c,v 1.4 2018/08/12 16:00:41 christos Exp $");
#endif /* not lint */
#include <ddb/ddb.h>
@@ -47,11 +47,15 @@
#include "extern.h"
+#ifdef VM_MIN_KERNEL_ADDRESS_DEFAULT
vaddr_t vm_min_kernel_address = VM_MIN_KERNEL_ADDRESS_DEFAULT;
+#endif
static struct nlist nl[] = {
{ .n_name = "_dumppcb" },
+#ifdef VM_MIN_KERNEL_ADDRESS_DEFAULT
{ .n_name = "vm_min_kernel_address" },
+#endif
{ .n_name = NULL },
};
@@ -68,11 +72,13 @@
sizeof(pcb)) {
errx(EXIT_FAILURE, "cannot read dumppcb: %s", kvm_geterr(kd));
}
+#ifdef VM_MIN_KERNEL_ADDRESS_DEFAULT
if ((size_t)kvm_read(kd, nl[1].n_value, &vm_min_kernel_address,
sizeof(vm_min_kernel_address)) != sizeof(vm_min_kernel_address)) {
errx(EXIT_FAILURE, "cannot read vm_min_kernel_address: %s",
kvm_geterr(kd));
}
+#endif
ddb_regs.tf_sp = pcb.pcb_sp;
ddb_regs.tf_bp = pcb.pcb_bp;
if (ddb_regs.tf_bp != 0 && ddb_regs.tf_sp != 0) {
Home |
Main Index |
Thread Index |
Old Index