Module Name:    src
Committed By:   ozaki-r
Date:           Fri Feb 27 00:47:30 UTC 2015

Modified Files:
        src/sys/ddb: db_xxx.c

Log Message:
Don't use an unset value as an address

Instead, show usage if no address is passed.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/ddb/db_xxx.c

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

Modified files:

Index: src/sys/ddb/db_xxx.c
diff -u src/sys/ddb/db_xxx.c:1.70 src/sys/ddb/db_xxx.c:1.71
--- src/sys/ddb/db_xxx.c:1.70	Fri Sep  5 09:27:24 2014
+++ src/sys/ddb/db_xxx.c	Fri Feb 27 00:47:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_xxx.c,v 1.70 2014/09/05 09:27:24 matt Exp $	*/
+/*	$NetBSD: db_xxx.c,v 1.71 2015/02/27 00:47:30 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.70 2014/09/05 09:27:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.71 2015/02/27 00:47:30 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kgdb.h"
@@ -161,6 +161,12 @@ db_show_files_cmd(db_expr_t addr, bool h
 	bool full = false;
 	fdtab_t *dt;
 
+	if (!haddr) {
+		db_printf("usage: show files address\n");
+		db_printf("\taddress == an address of a proc structure\n");
+		return;
+	}
+
 	if (modif[0] == 'f')
 		full = true;
 

Reply via email to