
Linux kernel Debug
文章平均质量分 58
RichardYSteven
这个作者很懒,什么都没留下…
展开
-
bochs调试内核的前期准备
内核调试前期准备原创 2017-03-02 10:28:04 · 931 阅读 · 0 评论 -
ubuntu上初次使用bochs
初次使用bochs原创 2016-10-17 06:43:25 · 1711 阅读 · 0 评论 -
linux perf使用经验之一二
linu perf使用经验之一二perf是一个非常强大的工具,之前听说但一直没有怎么用过。现在记录下来以便事后查找。编译除了从包管理器中安装,还可以从源代码里直接编译。非常简单,clone好内核源代码. cd linux/tools/perfmake怎么样, so easy吧。开跑哥是个急性子,别的先不想管,先看看这个东西能跑成什么样子。估计各位看官也是差不多,那咱就先跑几个来先看看。看看程序总体原创 2016-08-16 22:23:46 · 6504 阅读 · 0 评论 -
linux kdump
简单的工作原理配置翻译 2014-11-07 11:21:37 · 1178 阅读 · 0 评论 -
如何使用ftrace
http://www.ibm.com/developerworks/cn/linux/l-cn-ftrace/http://blog.youkuaiyun.com/ganggexiongqi/article/details/67102011. 编译内核ref:http://www.omappedia.org/wiki/Installing_and_Using_Ftrace=======转载 2013-10-29 11:36:08 · 3816 阅读 · 0 评论 -
利用debugfs来调试模块
http://www.cnblogs.com/wwang/archive/2011/01/17/1937609.htmlkernel中编译进debugfsKernel hacking [*] Debug filesystemCONFIG_DEBUG_FS挂载debugfs默认情况会挂载在/sys/kernel/debug下,如果没有转载 2013-06-07 10:09:26 · 2185 阅读 · 0 评论 -
一篇讲述sysfs和设备模型的文章
http://www.ibm.com/developerworks/cn/linux/l-cn-sysfs/index.html还引述到了其他的文章。http://blog.youkuaiyun.com/fudan_abc/article/details/1768277转载 2012-12-13 14:44:22 · 1107 阅读 · 0 评论 -
使用动态调试信息
http://blog.chinaunix.net/uid-1827018-id-3336703.html实验没过。。。转载 2012-11-06 10:18:32 · 705 阅读 · 0 评论 -
debug kernel with kernel debugger
http://www.ibm.com/developerworks/linux/library/l-kdbug/转载 2011-09-14 22:05:57 · 1408 阅读 · 0 评论 -
debug kernel with qemu
http://fengye110.72pines.com/archives/62http://blog.youkuaiyun.com/gdt_a20/article/details/72316521.内核cd linuxmkdir build“CONFIG_DEBUG_INFO=y” “CONFIG_KGDB=y” “CONFIG_KGDB_SERIAL_转载 2011-09-08 19:44:54 · 2168 阅读 · 0 评论 -
kernel debug with gdb/ddd
http://www.cs.wm.edu/~kearns/001lab.d/kernel_gdb.html原创 2011-09-07 21:48:45 · 1741 阅读 · 0 评论 -
通过/proc/partitions 查看分区信息
<br />文件/proc/partitions 可以查看分区信息。<br />$cat /proc/partitions <br />major minor #blocks name<br /><br /> 8 0 488386584 sda<br /> 8 16 488386584 sdb<br /> 8 32 488386584 sdc<br /> 8 48 488386584 sdd<br /><br /> <br /> <b原创 2010-12-30 11:37:00 · 27725 阅读 · 3 评论 -
通过/proc/ioports开查看端口的使用(/proc/iomem)
$cat /proc/ioports 0000-0cf7 : PCI Bus 0000:00 0000-001f : dma1 0020-0021 : pic1 0040-0043 : timer0 0050-0053 : timer1 0060-0060 : keyboard 0064-0064 : keyboard 0070-0071 : rtc0原创 2010-12-12 21:14:00 · 7870 阅读 · 2 评论 -
/proc/interrupts 和 /proc/stat 查看中断的情况
<br />在/proc文件系统下,又两个文件提供了中断的信息。<br /> <br />/proc/interrupts文件中列出当前系统使用的中断的情况,所以某个中断处理没有安装,是不会显示的。哪怕之前安装过,被卸载了。 <br />从左到右分别是, <br />irq的序号, 在各自cpu上发生中断的次数,可编程中断控制器,设备名称(request_irq的dev_name字段)<br />$cat /proc/interrupts <br /> CPU0 CP原创 2010-12-09 10:06:00 · 36368 阅读 · 0 评论 -
Panic 的例子
~# Unhandled kernel unalignedaccess[#1]: Cpu0原创 2010-12-07 09:49:00 · 2590 阅读 · 0 评论 -
Oops 消息的产生, 例子, 定位出错位置
oops消息的产生网上一分析oop流程的帖子, 留着以后看.http://blog.sina.com.cn/s/blog_3e4774e30100ooey.htmloops消息的例子1. 引用空指针 Unable to handle kernel NULL pointer dereference at virtual address 00000000转载 2010-11-23 11:55:00 · 5470 阅读 · 0 评论 -
使用seq_file,实现大文件的/proc file
<br />下面是个用seq_file实现大文件/proc file的例子。 重要的就是那几个迭代的函数。<br />值得一提的是,我这个例子在cat /proc/seq_test的时候 会显示出很多东西。也就是比我想象的要多。<br />后来我仔细的看了log,发现输出如下<br />Nov 21 15:44:14 wizard-desktop kernel: [ 9354.426472] scull: position is 0<br />Nov 21 15:44:14 wizard-desktop原创 2010-11-21 16:05:00 · 2629 阅读 · 1 评论 -
使用/proc 文件,只读的例子
<br />只用/proc文件是常用的调试方式,因为如果用很多的printk的话,对性能,及log显示都不是很好。<br />下面是一个简单的创建只读的proc文件的kernel module的例子。<br />例子中只是简单的输出了一句话,对于实际的项目可以打印不同的东西。<br /> <br />但是这个例子的缺点在于,使用proc文件读取时,只能读取一个page的大小?<br />/*<br /> * ================================================原创 2010-11-21 13:52:00 · 1655 阅读 · 0 评论 -
Debug System Hang with “magic SysRq key"
An indispensable tool for many lockups is the “magic SysRq key,” which is availableon most architectures. Magic SysRq is invoked with the combination of the Alt andSysRq keys on the PC keyboard原创 2009-09-04 10:31:00 · 1098 阅读 · 0 评论 -
Debugging by Watching -- strace
strace has many command-line options; the most useful of which are -t to display the time when each call is executed, -T to display the timespent in the call, -e to limit the types of call原创 2009-09-04 09:48:00 · 703 阅读 · 0 评论 -
Turning the Message on and off
The code for this feature:------------------------------------------------------------#undef PDEBUG /* undef it, just in case */#ifdef SCULL_DEBUG# ifdef __KERNEL__ /* This on原创 2009-09-03 11:11:00 · 710 阅读 · 0 评论 -
Kernel Configuration Options
Configure these options in "kernel hacking" column CONFIG_DEBUG_KERNELThis option just makes other debugging options available; it should be turned onbut does not, by itself, enable原创 2009-09-03 10:32:00 · 1435 阅读 · 0 评论 -
kernel debug by printk and syslogd
首先申明,我还没有试验成功。呵呵 在头文件 中定义了 【8种可用的日志级别字符串】KERN_EMERG 用于紧急事件消息,它们一般是系统崩溃之前提示的消息。KERN_ALERT 用于需要立即采取动作的情况。KERN_CRIT 临界状态,通常涉及严重的硬件或软件操作失败。KERN_ERR 用于报告错误状态;设备驱动程序会经常使用KERN_ERR转载 2008-10-21 18:42:00 · 1521 阅读 · 0 评论