Kernel dumps [was Re: possible changes from Panzura]

Will Andrews will at firepipe.net
Wed Jul 10 22:09:55 UTC 2013


On Wed, Jul 10, 2013 at 3:50 PM, Jordan Hubbard <jkh at mail.turbofuzz.com> wrote:
> Absolutely.  In fact, before the advent of remote network debugging, FW was totally the debugging method of choice since firewire target DMA lets you do all kinds of useful things (as well as a few things that simply scare the security guys to death ;-) ).
>
> My point was more that actually being able to debug a machine over the network is such a step up in terms of convenience/awesomeness that if anyone is thinking of putting any time and attention into this area at all, that's definitely the target to go for.
>
> Looking at http://www.opensource.apple.com/tarballs/xnu/xnu-2050.22.13.tar.gz there's even reasonable "documentation" on the kernel debugging protocol in xnu/osfmk/kdp.  Folks could do worse than try to clone it.  The gdb debugger macros in support of it are also in xnu/kgmacros.  None of it is going to be 'drop in' for FreeBSD by any stretch of the imagination, but it's always easier to get to a destination when you have a map. :-)    Anyone with a Mac can also ""nvram boot-args="debug=0x144"" and test-drive it around, just to see how it works in actual practice.  See also:  https://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KEXTConcept/KEXTConceptDebugger/debug_tutorial.html


Speaking of Apple solutions, I've recently used Apple's kgdb with the
kernel debug kit & kdp remote debugging, to debug a panic'd OS X host.
 It's really quite nice, because the debug kit comes with a ton of
macros, similar to kdb, and you also get the benefit of source
debugging.  I think FreeBSD would benefit massively from finding some
way to share macros between kdb and kgdb, in addition to having an
"emergency network stack" like you suggest.

As Alan says, until then, there's firewire, and also gdbsx if your
FreeBSD system is running as a Xen guest.

--Will.


More information about the freebsd-hackers mailing list