I have experience writing Windows drivers using the Windows DDK and debugging with WinDBG. I am trying to learn to write Mac OS X drivers using the IO Kit, and the information I have found looks like getting a system set up for kernel debugging is a challenge.
1) it appears that there is no graphical debugger like WinDBG on windows - only gdb. The version of gdb packaged with Xcode doesn't even have tui mode (text user interface) mode enabled. Since the xcode debugger is really a wrapper around gdb, why can't it work? Is the debug environment really this primative? Are there debuggers available that are better than using command line only gdb?
2) it looks like there is a tedious procedure to generate the debug symbols for the driver. Why doesn't the compiler generate the needed symbols?
3) I've read that the target and debugger machine most both be running the same OS. Is this really true? The Kernel Debug Kit for the OS you are debugging has the required symbols, why is the client OS relevant? Does this mean if you need to debug on multiple versions of OSX, you have to a client for each?
The best documentation these days for two-machine kernel debugging is in the Kernel Debug Kit ReadMe file.
The Kernel Debug Kits are available on the Apple Developer Downloads page. You need the Kernel Debug Kit matching the OS X build you're running on the target system that is running your kernel extension.
--gc