Help needed with lldb - attach to Mac after a kernel panic

I am trying to debug a kernel panic in our kext. I can attach to the target Mac over ethernet if I:

  1. cause an NMI using <Control><Option><Command><Shift><Escape>

  2. add an IOPanic call to my kext and cause it to be executed

  3. use Dtrace to invoke a panic

However if I reproduce the kernel panic which I am investigating, the Mac just restarts.

How can I make the Mac wait for me to attach with lldb rather than restarting?

My target configuration is: Mac is 2021 M1 Pro 14" MacBook Pro macOS 14.2 (23C64) Network: Apple Thunderbolt 3 <-> Thunderbolt 3 adapter + Apple Thunderbolt 2 to ethernet adapters Boot-args = "debug=0x44 wdt=-1 kdp_match_name=en8" (I have also tried debug=0x104C0C)

This is now being investigated by Apple. It turns out to have nothing to do with our kext as it occurs even without our kext loaded. It reproduces on Macs with Apple silicon.

This is now being investigated by Apple.

Do you have the bug number handy?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Help needed with lldb - attach to Mac after a kernel panic
 
 
Q