Developing and Debugging KEXT on mac

风流意气都作罢 提交于 2019-12-07 16:08:31

问题


I'm developing a KEXT on mac using Xcode, After every compile I'm changing permissions through terminal and load the KEXT, then reading results from console app. Some of the mistakes in development giving system a kernel panic and I have to restart my mac, this is so annoying. I was wondering if there is a better way to develop and debug a KEXT?


回答1:


This is too big a topic for an answer, but it is at least well documented, look at these documents from Apple:

  • When Things Go Wrong: Debugging the Kernel
  • Debugging a Kernel Extension with GDB
  • Technical Note TN2063: Understanding and Debugging Kernel Panics

Also note that you can get the output from kprintf() logging calls via Firewire (using the fwkpfv command-line utility on the other Mac) or Serial Port (mainly useful for testing in VMs, as modern Macs don't have serial ports). kprintf is synchronous, so unlike the kernel.log you will see the debug output even if it occurs immediately before a crash.



来源:https://stackoverflow.com/questions/13025906/developing-and-debugging-kext-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!