Regarding macOS kernel debugging via firewire

582 views Asked by At

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.

  1. Disable SIP
  2. cp /Library/Developer/KDKs/KDK_10.13.6_17G65.kdk/System/Library/Kernels/kernel.development /Systems/Library/Kernels
  3. sudo nvram boot-args="debug=0x147 kdp_match_name=firewire fwkdp=0x8000 kcsuffix=development pmuflags=1 -v keepsyms=1"
  4. sudo kextcache -invalidate /
  5. 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.

  1. Execute the command fwkdp in the terminal
  2. Launch lldb and execute kdp-remote localhost

But it always showed

error: KDP_REATTACH failed.

Any clue for this error? Anybody has some suggestion to fix this issue? Thanks!

0

There are 0 answers