How to get better debugging for the kernel.

Zaphod Beeblebrox zbeeble at gmail.com
Tue Aug 2 21:35:06 UTC 2016


I have just filed bug 211535.  I'd like to be more helpful, but I'm having
some trouble with the level of optimization in the kernel.  Much of kgdb's
output tells me that the value I'm looking for has been optimized away.

So... how do I compile a kernel or a module without optimization _and_ how
badly will that affect the runtime of a lightly loaded server?

My kernel is already compiled with -g.  That tells me that I'm looking in
zap_leaf.c (part of ZFS).  Can I simply compile zap_leaf.c without
optimization?


More information about the freebsd-hackers mailing list