kadb is a bootable kernel debugger with the same general syntax as adb. For the exceptions, see kadb(1M). One advantage of kadb is that the user can set breakpoints and when the breakpoint is reached, examine data or step through the execution of kernel code.
If the system is booted with the kadb -d command, values for variables in the core kernel can be set, but values for loadable modules would have to be set when the module was actually loaded.
For a brief tutorial on using the kadb command, see “Debugging” in Writing Device Drivers.