The kadb macros described below are particularly useful with the new multithreaded kernel.
thread displays the current thread. The current thread pointer is in SPARC global register g7.
kadb[0]: <g7$<thread |
threadlist shows the stack traces of all the kernel threads in the system. This can be a long list.
kadb[0]: $<threadlist |
mutex shows you the address of the owning thread. The following example uses the global unsafe driver mutex.
kadb[0]: unsafe_driver$<mutex |
kadb[0]: moddebug/W 0x80000000 |
moddebug enables you to watch module loading. See the end of <sys/modctl.h> for legal values for moddebug for debugging purposes only.