Page 1 of 1

Got "Waiting for link to become available" when debug kernel

PostPosted: Thu Nov 24, 2016 7:17 am
by chengyang
I'm trying to debug with kernel debugging on 10.12.1

The target machine has been setup to wait for the debugger (lldb) to attach on boot. Connecting from the host (caling kdp-remote) works as expected. However, after connecting and setting the target to continue, I'm often (90% of the time) presented with this message on the target machine:

"Waiting for link to become available"

When this occurs, a 'link' is never made and I have to reboot the target machine.

On the odd occasion that I'm able to boot into the OS with a valid connection, the OS sometimes locks up as though it has entered an infinite loop and the debugger doesn't know any different - my kext is not being automatically loaded, so is not responsible for this.

Why is kernel debugging so bad, what's the cause of the above message and how can I ensure that kernel debugging works 100% of the time?