libkvm: consumers of kvm_getprocs for non-live kernels?
Jilles Tjoelker
jilles at stack.nl
Wed Nov 10 21:17:36 UTC 2010
On Wed, Nov 10, 2010 at 09:41:52PM +0100, Ulrich Spörlein wrote:
> I have this cleanup of libkvm sitting in my tree and it needs a little
> bit of testing, especially the function kvm_proclist, which is only
> called from kvm_deadprocs which is only called from kvm_getprocs when kd
> is not ALIVE.
> The only consumer in our tree that I can make out is *probably* kgdb, as
> ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and
> bsnmpd don't really work on coredumps
> But, the kgdb file gnu/usr.bin/binutils/gdb/kvm-fbsd.c, where
> kvm_getprocs is probably called on a dead kernel is not even used during
> build!
> So I guess I'm staring at dead code here, any kvm people around that can
> clue me in?
It is a while ago that I last used this, but ps and fstat definitely
worked on crashdumps, to some extent. /usr/sbin/crashinfo uses this.
--
Jilles Tjoelker
More information about the freebsd-hackers
mailing list