Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Kernel Debugging with LLDB and VMware Fusion (ddeville.me)
53 points by ddeville on Aug 16, 2015 | hide | past | favorite | 2 comments


Just a few other notes to help make kernel development with VMware Fusion easier:

1. Add -zc and -zp to your boot args. It's not documented but it greatly helps catch zone allocation problems (OSMalloc/OSFree/buffer overrun) issues.

2. Use snapshots instead of rebooting. It's much faster to revert back to a snapshot than to reboot your virtual machine instance after a crash.

3. If you use a shared directory between your instance and host machine for moving your KEXTs/other code, make sure to MD5 the files before loading. It's very common for the instance to be using stale cached blocks.

4. While not necessary, I create a separate network interface that's host only to debug on. I give it a static ip and add an entry to my host's host file. It makes debugging instances easier to do since I can connect by name, i.e. kdb-remote vm0.


Thanks for the tips! I had never thought of using a snapshot as a quick way to return to the state before a panic instead of rebooting. This is genius, I'll definitely use it a lot!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: