GDB for debugging Linux device drivers

2019-08-16 23:57发布

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!

2条回答
我命由我不由天
2楼-- · 2019-08-17 00:42

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.

查看更多
Juvenile、少年°
3楼-- · 2019-08-17 00:43

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.

查看更多
登录 后发表回答