Date: Sun, 17 Aug 2008 20:20:51 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Guillaume Ballet <gballet@gmail.com> Cc: freebsd-hackers@freebsd.org, Sam Leffler <sam@freebsd.org> Subject: Re: Extending the ddb command set Message-ID: <20080817172051.GX1803@deviant.kiev.zoral.com.ua> In-Reply-To: <fd183dc60808171017m7eabcef2xbe1845e54cda4c99@mail.gmail.com> References: <fd183dc60808160203r3d90c26dq4d282d2ef153d2db@mail.gmail.com> <48A70B37.60401@freebsd.org> <fd183dc60808171017m7eabcef2xbe1845e54cda4c99@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <sam@freebsd.org> 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<http://pe= ople.freebsd.org/%7Ejhb/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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080817172051.GX1803>