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/141cd6c347a2
branches:  trunk
changeset: 454597:141cd6c347a2
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 aa82628595cb -r 141cd6c347a2 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