I have used GDB in linux to debug C programs effortlessly in user space. Now, I am working on kernel space modules and I thought GDB would work the same way. However, the run command does not work for the .ko file, and I don’t think it should. That being said, how does one use GDB for kernel modules? I tried several examples I found on other sites:
(gdb) set solib-search-path my_module.ko
Supposedly, this was supposed to load the symbols from the module code, but nothing happened. Can anyone provide some insight?
I don’t think you can easily use GDB to debug kernel modules
Use KGDB instead:
http://kgdb.linsyssoft.com/intro.htm