ww2000e 发表于 2011-12-08 15:32

dmesg记录段错误的程序怎么弄?

怎么样能段错误用dmesg可以查?

mezilla 发表于 2011-12-08 15:34

dmesg 记录的信息有限。
你可以打开core文件记录。

ww2000e 发表于 2011-12-08 15:36

dmesg 记录的信息有限。
你可以打开core文件记录。
mezilla 发表于 2011-12-08 15:34 http://bbs.chinaunix.net/images/common/back.gif

守护进程应该怎么产生core? 还有用dmesg记录应该怎么做?

crazyhadoop 发表于 2011-12-08 16:09

dmesg 一般都是内核模块开发用printk记录的, 只要系统ulimit 设置core文件size 不为0,崩溃是就可以产生core文件了

ww2000e 发表于 2011-12-08 16:59

回复 4# crazyhadoop

我就是奇怪为啥我的程序段错误了,dmesg可以看到

zxcyyzz 发表于 2015-09-16 10:47

安装在pc上的Ubuntu运行一个段错误程序后,用dmesg可以打印出这个段错误的相关信息:
xiao: segfault at 0 ip 080483c4 sp bf815788 error 6 in xiao
a.out: segfault at 0 ip 080483c4 sp bff93648 error 6 in a.out
xiao: segfault at 0 ip 080483c4 sp bf965978 error 6 in xiao
但我自己编了一个linux内核在ARM上面跑,相关的段错误信息不能用dmesg打印出来,请问这是需要安装什么服务、或是系统配置吗?请指教。

yjh777 发表于 2015-10-19 18:28

The fault handler is architecture dependent, so you will not observe the same messages in dmesg with other architectures than x86. For instance, on ARM no message is displayed unless the Linux kernel has been built with CONFIG_DEBUG_USER.

yjh777 发表于 2015-10-19 18:30

http://www.enodev.fr/posts/decode-segfault-errors-in-dmesg.html

http://www.slideshare.net/noobyahoo/introduction-to-segmentation-fault-handling-5563036


http://www.linuxquestions.org/questions/slackware-14/segfault-in-dmesg-output-834800/
http://serverfault.com/questions/518623/segfaults-are-not-logging-into-var-log-messages
页: [1]
查看完整版本: dmesg记录段错误的程序怎么弄?