How to debug hacked Linux Kernel code
I am newbie in this filed. I don't have no good way to debug it. Just开发者_JAVA百科 build it, reboot and run. Any hint is very appreciated!
Depending on what you are hacking, it might be better to use UML (User Mode Linux). If you're messing with non-hardware dependent code, then I think it will help a great deal.
UML allows you to compile the kernel as an ordinary user mode program, and run it as any other application on your system. Because it runs like a regular application, you can very easily debug it with gdb, or any other debugger of choice.
Here's a good start for UML
I'd recommend you to start from reading 4th chapter ("Debugging Techniques") of classical Linux Device Drivers book.
精彩评论