Anybody has good experience regarding macOS kernel debugging via firewire?
I have two machines, Mac mini 2014 for target, MacBook Pro 2017 for host. And I followed the instruction from Kernel Debug Kit Read Me, but on host it always shows
error: KDP_REATTACH failed" when I issued "kdp-remote localhost
On target machine, I followed the following instructions.
- Disable SIP
cp /Library/Developer/KDKs/KDK_10.13.6_17G65.kdk/System/Library/Kernels/kernel.development /Systems/Library/Kernels
sudo nvram boot-args="debug=0x147 kdp_match_name=firewire fwkdp=0x8000 kcsuffix=development pmuflags=1 -v keepsyms=1"
sudo kextcache -invalidate /
sudo reboot
After rebooting, I didn't see the info "wait for debugger ...", it directly goes to login screen after showing some system info. Is that normal?
On host machine, I followed the following instructions.
- Execute the command
fwkdp
in the terminal - Launch
lldb
and executekdp-remote localhost
But it always showed
error: KDP_REATTACH failed.
Any clue for this error? Anybody has some suggestion to fix this issue? Thanks!