From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 17 18:05:33 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF67A106567C; Sun, 17 Aug 2008 18:05:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 510F98FC1F; Sun, 17 Aug 2008 18:05:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KUlw7-0000Mo-EJ; Sun, 17 Aug 2008 20:21:03 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m7HHKpV7028318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 17 Aug 2008 20:20:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m7HHKpiw056807; Sun, 17 Aug 2008 20:20:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m7HHKpl2056806; Sun, 17 Aug 2008 20:20:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 17 Aug 2008 20:20:51 +0300 From: Kostik Belousov To: Guillaume Ballet Message-ID: <20080817172051.GX1803@deviant.kiev.zoral.com.ua> References: <48A70B37.60401@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eLx2Oic5rP1+EtIt" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KUlw7-0000Mo-EJ 426e5cd6cec5714c9e57ec0beccee51b X-Terabit: YES Cc: freebsd-hackers@freebsd.org, Sam Leffler Subject: Re: Extending the ddb command set X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2008 18:05:33 -0000 --eLx2Oic5rP1+EtIt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 17, 2008 at 05:17:54PM +0000, Guillaume Ballet wrote: > On Sat, Aug 16, 2008 at 5:15 PM, Sam Leffler wrote: > > > > Guillaume Ballet wrote: > >> > >> Hello hackers, > >> > >> I am currently working on a small project and would like to add a few > >> commands to the set that is available in ddb. > >> > >> I found that very interesting albeit succinct presentation: > >> http://people.freebsd.org/~jhb/papers/bsdcan/2008/slides.odp > >> > >> where the author hints that I should use DB_COMMAND, which I did. Yet = when > >> invoking ddb, the command does not appear in the help list. I have tak= en a > >> look at the source code and was expecting set_db_cmd_set to appear in = my > >> module's section list when calling objdump -h > >> > >> Is DB_COMMAND only working within the kernel itself, and not modules? > >> > >> > > > > That is correct; you can't add ddb cmds from modules. It should be doa= ble; just hasn't been done yet. > > > > Sam > > >=20 > It is indeed doable: Here are the diffs for a first attempt at doing > this. I am not entirely satisfied with it, though, as it does not work > with DB_SHOW_COMMAND and the likes... Also, I have to declare a lot of > ddb-related stuff into kern_linker.c and I don't like it. I am > currently working at improving the whole thing, but in the mean time > if someone wants to give it a try, comments/rants would be greatly > appreciated. What about module unloading ? --eLx2Oic5rP1+EtIt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkioXfIACgkQC3+MBN1Mb4g2ZgCgiBQDPYxUx6lKrE54jZG36oJ9 XPUAn29MyDAYGSzrRO6Oa9WjQcb+oFp/ =Jgdb -----END PGP SIGNATURE----- --eLx2Oic5rP1+EtIt--