GDB用于调试Linux设备驱动程序 [英] GDB for debugging Linux device drivers

查看:651
本文介绍了GDB用于调试Linux设备驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是使用GDB调试器的新手。我正在关注链接 http://www.linuxforu.com/2011 / 01 / understanding-a-kernel-oops /
我使用相同的代码和相同的 Makefile 。 Syslogd正在运行,并且 CONFIG_DEBUG_INFO 被设置为 y 。但是,我仍然不成功。当我用GDB打开 .ko 文件时,我收到消息


没有调试符号找到


当我使用列表* 命令时, / b>


没有找到符号表。 帮助我。



谢谢!

解决方案

树木驱动器怪癖。使用



CONFIG_DEBUG_INFO = 1 make



在构建驱动程序时可以获得调试符号。


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!

解决方案

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.

这篇关于GDB用于调试Linux设备驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆