NetBSD Problem Report #36526
From woods@building.weird.com Fri Jun 22 18:47:22 2007
Return-Path: <woods@building.weird.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 447DB63B882
for <gnats-bugs@gnats.netbsd.org>; Fri, 22 Jun 2007 18:47:22 +0000 (UTC)
Message-Id: <m1I1oAD-002IwcC@building.weird.com>
Date: Fri, 22 Jun 2007 14:47:21 -0400 (EDT)
From: "Greg A. Woods" <woods@planix.com>
Sender: "Greg A. Woods" <woods@building.weird.com>
Reply-To: "Greg A. Woods" <woods@planix.com>
To: gnats-bugs@NetBSD.org
Subject: ddb(4) doesn't document ddb.commandonenter fully, nor correctly
X-Send-Pr-Version: 3.95
>Number: 36526
>Category: kern
>Synopsis: ddb(4) doesn't document ddb.commandonenter fully, nor correctly
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 22 18:50:00 +0000 2007
>Closed-Date: Sun Feb 12 12:45:57 +0000 2012
>Last-Modified: Sun Feb 12 12:45:57 +0000 2012
>Originator: Greg A. Woods
>Release: netbsd-4
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD 4.0_BETA2
>Description:
while ddb(4) mentions the compile-time option to set
DDB_COMMANDONENTER, it does not mention the sysctl variable
"ddb.commandonenter"
The example is also bogus, since the ddb(4) command-line parser
does not actually understand the ";" command separator.
setting ddb.maxwidth=0 doesn't exactly have the desired effect
in all cases either..... for example "help" produces one line
per command, which is extremely hard to read, especially given
that the groupings are lost.
>How-To-Repeat:
db{0}> trace; ps
Bad character
cpu_Debugger(c49b7400,0,ce282f38,c0348610,c49b7460) at netbsd:cpu_Debugger+0x4
comintr(c49b7400,0,10,30,10) at netbsd:comintr+0x6f0
Xintr_ioapic_edge4() at netbsd:Xintr_ioapic_edge4+0x9c
--- interrupt ---
netbsd:cpu_switch+0xab:
db{0}> trace;ps
Bad character
cpu_Debugger(c49b7400,0,ce282f38,c0348610,c49b7460) at netbsd:cpu_Debugger+0x4
comintr(c49b7400,0,10,30,10) at netbsd:comintr+0x6f0
Xintr_ioapic_edge4() at netbsd:Xintr_ioapic_edge4+0x9c
--- interrupt ---
netbsd:cpu_switch+0xab:
db{0}>
trying it for real with sysctl results in an endless loop that
cannot be broken out of without a hardware reset or power off
>Fix:
this hack sort of partly fixes the documentation at least....
(note that other recent doc fixes still need to be pulled up to
netbsd-4 too!!!!)
Index: share/man/man4/ddb.4
===================================================================
RCS file: /cvs/master/m-NetBSD/main/src/share/man/man4/ddb.4,v
retrieving revision 1.103
diff -u -r1.103 ddb.4
--- share/man/man4/ddb.4 28 Mar 2007 14:45:35 -0000 1.103
+++ share/man/man4/ddb.4 22 Jun 2007 18:45:41 -0000
@@ -87,10 +87,10 @@
output to the kernel msgbuf:
.Cd options DDB_TEE_MSGBUF=1
.Pp
-To specify commands which will be executed on each entry to
+To specify a command which will be executed on each entry to
.Ic ddb :
-.Cd options DDB_COMMANDONENTER="trace;show registers"
-In this case, "trace" and then "show registers" will be executed automatically.
+.Cd options DDB_COMMANDONENTER="trace"
+In this case ``trace'' will be executed automatically.
.Sh DESCRIPTION
.Nm
is the in-kernel debugger.
@@ -1180,6 +1180,10 @@
.Pp
Built-in variables currently supported are:
.Bl -tag -offset indent -width "maxwidth" -compact
+.It Va commandonenter
+A command to be run automatically when
+.Nm
+is entered.
.It Va lines
The number of lines.
This is used by the
@@ -1201,7 +1205,7 @@
wraps the current line by printing new line when
.Va maxwidth
column is reached.
-When this varibale is set to zero
+When this variable is set to zero
.Nm
doesn't perform any wrapping.
.It Va onpanic
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: sborrill@NetBSD.org
State-Changed-When: Sun, 12 Feb 2012 12:45:57 +0000
State-Changed-Why:
Some parts not correct (e.g. multiple commands not working).
Documentation change committed for missing sysctl section.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.