On Tue, Sep 25, 2007 at 12:35:17PM +0200, [EMAIL PROTECTED] wrote:

> You can find a webrev for changes to mdb to allow ctf to be loaded with 
> raw targets at:
> http://www.bruningsystems.com/webrev.rawctf.

Hmm. I think you could make things a lot simpler by utilising the CTF within
the MDB modules themselves by default. Each MDB module has its own CTF:

$ ctfdump /usr/lib/mdb/kvm/ufs.so  | head

- CTF Header -----------------------------------------------------------------

  cth_magic    = 0xcff1
  cth_version  = 2
  cth_flags    = 0x01

You can see this being used in mdb_ctf_vread() and the (currently unused)
mdb_ctf_module_lookup().

You could then abstract out the search logic in mdb_module_load() and use that
to find the ufs.so binary when someone does '::loadctf ufs'. Nice and easy to
use for a common case...

Also accept a full path for cases when MDB module's CTF isn't sufficient. Then,
you could directly load the CTF from the binary and keep that on a
modules-style list inside the rawfile target.

Of course, given that this is useful for every target except kmdb, you'd want
to make the command more generic too.

That would be very cool...

regards
john
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to