At first, I need a tool to debug Linux kernel step by step. KGDB is very convenient. It's a source level debugger and it requires two machines, one is target machine in which linux kernel is running with KGDB enabled, the other is development machine, you can watch, trace, and set breakpoints by running gdb here.
Actually you can install a virtualbox in your workstation instead of a real hardware as the target machine. you can get the package from virtualbox official website:
It is free and opensource under GPL version 2; i386 for 32-bit OS and amd64 for 64-bit OS.
After downloading deb file, you can install it by command(Ubuntu 64-bit):