Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ddb fix "show kernhist".



details:   https://anonhg.NetBSD.org/src/rev/cb2c3c70b3e2
branches:  trunk
changeset: 965565:cb2c3c70b3e2
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Sep 22 12:57:34 2019 +0000

description:
fix "show kernhist".

set addr = 0 if we don't have_addr and avoid using random garbage in addr.

diffstat:

 sys/ddb/db_command.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 94ea7b2a4450 -r cb2c3c70b3e2 sys/ddb/db_command.c
--- a/sys/ddb/db_command.c      Sun Sep 22 10:35:12 2019 +0000
+++ b/sys/ddb/db_command.c      Sun Sep 22 12:57:34 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_command.c,v 1.160 2018/09/17 01:49:54 kre Exp $     */
+/*     $NetBSD: db_command.c,v 1.161 2019/09/22 12:57:34 mrg Exp $     */
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.160 2018/09/17 01:49:54 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.161 2019/09/22 12:57:34 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -1241,6 +1241,8 @@
     db_expr_t count, const char *modif)
 {
 
+       if (!have_addr)
+               addr = 0;
        kernhist_print((void *)(uintptr_t)addr, count, modif, db_printf);
 }
 #endif



Home | Main Index | Thread Index | Old Index