Max - Interesting stuff. It seems to me that there are basically two separate things here:
1. Something like ::loadctf to load arbitrary CTF data from files. 2. A mechanism to identify a raw target as a UFS device and auto-load the CTF data from /kernel/fs/ufs. Both of these seem useful in their own right, so I hope your solution can be adapted to fit both needs. Note that ZFS is going to be vastly more difficult, depending on how much you want to try to accomplish. The problem is that ZFS data can be spread across multiple devices, so you don't have a single raw target. For a dynamically striped or mirrored pool, you could look at a single disk, but if any DVA referenced another toplevel vdev, you'd have to start up another MDB session on the other device and look at it there. Tackling RAID-Z is even more difficult because the raw block you're looking for is spread across several devices. One could imagine a 'ZFS pool' backend instead of a 'raw + CTF' backend. The problem then becomes the fact that the fundamental address in ZFS is a DVA, which is 128 bits. MDB uses uintptr_t sized values for virtually everything, so getting this to work would be quite a challenge (but extremely cool). Anyway, what you have now is sounds interesting, it'd be cool to see a webrev of what you have so far. - Eric -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock