moved dbg.h to kernel since only that code uses it