Module Name:    src
Committed By:   christos
Date:           Sun Aug 12 16:00:41 UTC 2018

Modified Files:
        src/usr.sbin/crash/arch: x86.c

Log Message:
i386 does not have a variable min address (yet)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/crash/arch/x86.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/crash/arch/x86.c
diff -u src/usr.sbin/crash/arch/x86.c:1.3 src/usr.sbin/crash/arch/x86.c:1.4
--- src/usr.sbin/crash/arch/x86.c:1.3	Sun Aug 12 11:55:26 2018
+++ src/usr.sbin/crash/arch/x86.c	Sun Aug 12 12:00:41 2018
@@ -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 @@ __RCSID("$NetBSD: x86.c,v 1.3 2018/08/12
 
 #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 @@ db_mach_init(kvm_t *kd)
 	    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) {

Reply via email to