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 make things link again.



details:   https://anonhg.NetBSD.org/src/rev/e88083636699
branches:  trunk
changeset: 365338:e88083636699
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Aug 12 15:05:13 2018 +0000

description:
make things link again.

diffstat:

 usr.sbin/crash/arch/x86.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r d26f19e91c2d -r e88083636699 usr.sbin/crash/arch/x86.c
--- a/usr.sbin/crash/arch/x86.c Sun Aug 12 14:32:39 2018 +0000
+++ b/usr.sbin/crash/arch/x86.c Sun Aug 12 15:05:13 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: x86.c,v 1.1 2011/04/30 16:57:58 christos Exp $ */
+/*     $NetBSD: x86.c,v 1.2 2018/08/12 15:05:13 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.1 2011/04/30 16:57:58 christos Exp $");
+__RCSID("$NetBSD: x86.c,v 1.2 2018/08/12 15:05:13 christos Exp $");
 #endif /* not lint */
 
 #include <ddb/ddb.h>
@@ -47,7 +47,10 @@
 
 #include "extern.h"
 
+vaddr_t vm_min_kernel_address = VM_MIN_KERNEL_ADDRESS_DEFAULT;
+
 static struct nlist nl[] = {
+       { .n_name = "vm_min_kernel_address" },
        { .n_name = "_dumppcb" },
        { .n_name = NULL },
 };
@@ -65,6 +68,11 @@
            sizeof(pcb)) {
                errx(EXIT_FAILURE, "cannot read dumppcb: %s", kvm_geterr(kd));
        }
+       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));
+       }
         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