Kernel debugging on late 2016 MBPs

Hi!


I've been trying to do 2 machine kernel debugging on a pair of 15" late 2016 MBPs, but I just can't get the debuggee to break properly or use the right IP address for that matter. If I use the release kernel it just wheezes through even though my boot-args contain debug=0x147.


If I use the debug kernel from the matching KDK I instead get a panic followed by information that it's trying to connect to a debugger using mac address 00:00:00:00:00:00 and IP address 0.0.0.0 (kdp_poll: no <something>), even though I've set _kdp_ipstr and kdp_match_name. Which brings me to the next question: am I supposed to use a thunderbolt-compatible network adapter and if so does it matter which port I put it in? I've tried two of them in all the ports.


Finally, when I delete the boot-args nvram variable I am unable to boot without first going into the recovery OS and using the first aid of the disk utility. Until I do that, I get a prohibited sign.


All things considered, this could be going a lot better.

Replies

I can’t have a lot of input here (I haven’t tried kernel debugging on these latest machines) but I can answer this one:

… am I supposed to use a thunderbolt-compatible network adapter …

Yes. You’ll need the Thunderbolt 3 (USB-C) to Thunderbolt 2 Adapter and either the Thunderbolt to Gigabit Ethernet Adapter or the Apple Thunderbolt to FireWire Adapter.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Wait, are you saying that it won't work with the thunderbolt 3 Belkin gigabit Ethernet adapter?

Wait, are you saying that it won't work with the thunderbolt 3 Belkin gigabit Ethernet adapter?

Sorry, but I just don’t know.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

That actually seems to have been the problem. TB3->TB2->Ethernet did work.

I'm grafting to this subject : do we have any news about this ?


I have a MacBook Pro 2017 (MacBookPro14,3), with a USB-C Ethernet adapter (Satechi), and I'm not able to make remote debug or core dump sending works. I tried :

- nvram boot-args="debug=0x144 kdp_match_mac=*** _panicd_ip=ZZZ" -> doesn't work

- nvram boot-args="debug=0x144 kdp_match_name=enX _panicd_ip=ZZZ" -> doesn't work


It used to works on previous macs, if I remember well 😟


And the disappointing thing is that it actually works in macOS hosted by a VMWare VM with briding network on this network adapter…