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:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.