Subject: Re: ddb help command patch
To: Adam Hamsik <haaaad@gmail.com>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/28/2007 10:39:12
--2fHTh5uZTiUOsy+g
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jun 27, 2007 at 11:31:48PM +0200, Adam Hamsik wrote:
>=20
> On Jun 27, 2007, at 8:21 PM, Bill Stouder-Studenmund wrote:
>=20
> >On Wed, Jun 27, 2007 at 11:03:10AM -0700, Bill Stouder-Studenmund =20
> >wrote:
> >
> >Note: one thing I wasn't clear on. We have one of the above per =20
> >command
> >table. So all the internal commands would be covered by generating =20
> >one of
> >the above command list entries. When an lkm adds commands (say 5 of =20
> >them),
> >we add only one list entry for the whole table of 5.
> >
>=20
> >The other API changes would be that you register a command table, =20
> >not an
> >individual command.
>=20
> Sounds good.
> But I have some questions:)
>=20
> 1)How nested commands like show (contains 3 tables of commands) =20
> should be implemented. Another level of TAILQ_ENTRY?

Probably another list of tables. So there'd be a list head for general=20
commands, and a list head for "show" commands.

An alternative would be that we don't allow spaces in a command name=20
(which we don't), and sub commands could be entered as "show bufs" or=20
something like that. The "show" command knows how to walk the list and=20
find everything that has the form "show " + something.

> 2)what is default number of used groups or ddb_command_list entries =20
> 2? (machine table and now default db_command_table)? We can group =20
> commands to more group like gdb does(show, crash, trace, machine, =20
> ffs, uvm, etc..).

Not sure. I think we're wandering out of my expertise in ddb.

> 3)Is struct db_command good or have I change also this in some way?
> IMHO I can change cmd_arg to char **cmd_arg and use array of NULL =20
> terminated strigs for arguments and their description.

I'll leave that to someone else to answer. I'm not sure.

Take care,

Bill

--2fHTh5uZTiUOsy+g
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFGg/JAWz+3JHUci9cRAvz/AJ48FIMsFkiYjR/EnbEPdFrSbtx2pACfdwXs
2paMXadGjt5XRS3jNMeUwDo=
=RVfl
-----END PGP SIGNATURE-----

--2fHTh5uZTiUOsy+g--