Subject: Re: ddb help command patch
To: Adam Hamsik <haaaad@gmail.com>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 06/08/2007 00:56:15
On Fri, Jun 08, 2007 at 12:19:59AM +0200, Adam Hamsik wrote:
> db>help break
>
> prints "Set breakpoint to address"
I like the general idea, but I would like to make the additional help
support optional. This has two reasons:
- ddb is very usefull even in tiny configurations where every kernel
byte counts
- people doing heavy kernel work might decide to not need the help
a lot (or have the other machine, where they cross build from,
easily available to run "man ddb")
Could you define a macro to declare the DDB command and make it just ignore
the help string parameter if compiled w/o the DDB_VERBOSE_HELP (or whatever
we'd call it) option?
i.e. change this
{ "mbuf", "Show number and status of mbuf's.", db_mbuf_print_cmd,
0, NULL },
to:
DDB_DECLARE_SIMPLE_CMD("mbuf", "Show number and status of mbuf's.",
db_mbuf_print_cmd)
(and a non-SIMPLE variant if the "flags" or "more" field are filled in?)
And feel free to use other names, I'm not good at inventing them ;-}
Martin