GDB for debugging Linux device drivers

烈酒焚心 提交于 2019-12-12 01:08:43

问题


I am new to using GDB debugger. I am following the link http://www.linuxforu.com/2011/01/understanding-a-kernel-oops/ I am using the same code and the same Makefile. Syslogd is running and CONFIG_DEBUG_INFO is set to y. But, I am still not successful. When I open the .ko file with GDB I get the message

No debugging symbols found

and when I use the list* command, I get

No symbol table found.

Please help me out.

Thanks!


回答1:


This is probably one of the quirks of building drivers out of tree. Using

CONFIG_DEBUG_INFO=1 make

when you build your driver gets you the debug symbols.




回答2:


You can try adding -g option while compiling the modules. This option should generate debugging symbols. Cannot say exactly why your flag 'CONFIG_DEBUG_INFO' is not working.



来源:https://stackoverflow.com/questions/11112685/gdb-for-debugging-linux-device-drivers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!