On Mon, Oct 10, 2005 at 08:39:08PM +0100, Frank Hofmann - Solaris Sustaining wrote: > > For the time being, I've put the PDF file only onto my old student > account at http://cip.physik.uni-wuerzburg.de/~hofmann/docs/book.pdf > where I'll keep it until the editable material on mediacast.sun.com > is publically reachable. > > mdb usage examples are Chapter 7.
These are really nice. One minor comment is that the ::print usage doesn't take advantage of some of the enhancements to ::print in Solaris 10. Two tricks: 1. quoting is no longer required for "struct foo" 2. you can print structure members and dereference pointers using '.', '->', and '[]'. (in particular, putting '[]' at the end of a chain of things will dereference pointer elements) Combined, these make: > ffffffff8126fdc8::print "struct modctl" mod_linkage | ::print "struct modlinkage" { ml_rev = 0x1 ml_linkage = [ 0xffffffffc00aaeb0, 0, 0, 0, 0, 0, 0 ] } > modldrv1::print "struct modldrv" { drv_modops = mod_driverops drv_linkinfo = 0xffffffff5196e72 "AMD Powernow! 1.15 (ACPICA)" drv_dev_ops = powernow_dev_ops } > powernow_dev_ops::print "struct dev_ops" devo_cb_ops | ::print "struct cb_ops" cb_ioctl cb_ioctl = powernow_ioctl > just be: > ffffffff8126fdc8::print struct modctl struct modctl[] { mod_linkage->ml_rev = 0x1 mod_linkage->ml_linkage = [ 0xffffffffc00aaeb0, 0, 0, 0, 0, 0, 0 ] } > modldrv1::print struct modldrv drv_dev_ops->devo_cb_ops->cb_ioctl drv_dev_ops->devo_cb_ops->cb_ioctl = powernow_ioctl > Note that we can't make this shorter, since ml_linkage is typed as "void *". Cheers, - jonathan