sdb can be used for userland core dumps but most current commands assume that we are in the kernel. E.g. stacks blows up in userland core dumps and other commands like slabs make no sense.
What we need
SDB should detect:
Whether its ran against a kernel crash dump or a userland core dump and load the appropriate SDB commands (e.g. userland stacks vs kernel stacks).
If kernel crash dump - which kernel modules are loaded and load the appropriate SDB commands (e.g. zfs, nfs, etc..)
If kernel crash dump - which config parameters are set and load the appropriate SDB commands (e.g slab vs slub)
If userland core - what's the main executable? (e.g. load zfs commands if ztest)
If userland core - which libraries are loaded? (e.g. load zfs commands for libzpool)
Motivation
sdb can be used for userland core dumps but most current commands assume that we are in the kernel. E.g.
stacks
blows up in userland core dumps and other commands likeslabs
make no sense.What we need
SDB should detect:
stacks
vs kernelstacks
).