Unless someone has done this already, I have a few spare days and will write a dcmd that gives me what I need. thanks, max
Frank Hofmann wrote: > On Mon, 29 Jan 2007, Phill Hughes - PTS Kernel EMEA wrote: > >> Hi Max, >> >> I don't think mdb is the utility you are looking for, from the mdb(1) >> man page - > > Sorry to be blunt - rubbish. > > mdb is just _great_ for looking at disks. Even its raw hexdumper is > more useful than the fsdb equivs, or something like "<addr>,N/naX" to > dump e.g. block arrays is much simpler to remember than the too-terse > and extremely fs-specific fsdb commands. > And indeed, if we could import kernel CTF stabs for looking at on-disk > data structures, it'd beat fsdb in usability by miles, if not > light-years. > > I second the thought of having a "::ctfimportfrom <crashdump>" ... > Max, if you need help with writing it please contact me off the list. > > FrankH. > > > >> >> The mdb utility is an extensible utility for low-level >> debugging and editing of the live operating system, operat- >> ing system crash dumps, user processes, user process core >> dumps, and object files. >> >> As far as ufs is concerned, have you tried using fsdb? Check out the >> fsdb_ufs(1M) man page. I am not aware of a similar utility for zfs, >> but someone else here may be. >> >> Hope this helps. >> >> >> Phill >> >> >> max at bruningsystems.com wrote: >>> Hi. >>> >>> I want to be able to use ::print some_type_in_kernel with the raw >>> disk as a target. Has anyone already done this, or do I need to >>> write code? Here is an example of what I want to do: >>> >>> # mdb /dev/rdsk/c1t0d0s0 <-- device contains a ufs (or zfs) file system >>> physical_disk_address::print -p struct icommon <-- given address of >>> inode on disk, print it out >>> >>> (Yes, I know struct icommon does not work for zfs...). >>> >>> I am currently using mdb on a zfs disk, but have to dump raw hex and >>> try to map it to a dnode_phys_t, blk_dva, etc by comparing with the >>> same output with mdb -k. If I know (or think I know) what the data >>> type is on the disk, it would be great if I could tell mdb to dump >>> it out. >>> >>> I have tried loading the zfs module within mdb, but that doesn't >>> help. And using mdb -k /dev/rdsk/c1t0d0s0 doesn't work because >>> /dev/rdsk/c1t0d0s0 is not an ELF file. Maybe this is as simple as >>> turning off mdb's error checking??? >>> >>> thanks, >>> max >>> >>> _______________________________________________ >>> mdb-discuss mailing list >>> mdb-discuss at opensolaris.org >> _______________________________________________ >> mdb-discuss mailing list >> mdb-discuss at opensolaris.org >> >