[英]Loading modules through GDB
I have used GDB in linux to debug C programs effortlessly in user space. 我在linux中使用GDB在用户空间中毫不费力地调试C程序。 Now, I am working on kernel space modules and I thought GDB would work the same way.
现在,我正在研究内核空间模块,我认为GDB将以相同的方式工作。 However, the run command does not work for the .ko file, and I don't think it should.
但是,run命令不适用于.ko文件,我认为不应该。 That being said, how does one use GDB for kernel modules?
话虽如此,如何将GDB用于内核模块? 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 我认为您不能轻易使用GDB来调试内核模块
Use KGDB instead: 使用KGDB代替:
http://kgdb.linsyssoft.com/intro.htm http://kgdb.linsyssoft.com/intro.htm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.