码迷,mamicode.com
首页 > 其他好文 > 详细

确定core文件是由哪个文件产生的方法

时间:2015-01-13 23:22:32      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:调试技术   程序崩溃   linux   x86   

1.用gdb打开core文件来确定。如下例子:

[xuzhina@localhost ~]$ ls
asm.list    Desktop    Downloads  Pictures  Templates  vmtoolsd
core.22625  Documents  Music      Public    Videos     vmtoolsd.tar.gz
[xuzhina@localhost ~]$ ls core.22625 
core.22625
[xuzhina@localhost ~]$ gdb -c core.22625 
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-51.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
[New LWP 22625]
[New LWP 22680]
Core was generated by `/usr/lib/vmware-tools/sbin64/vmtoolsd -n vmusr --blockFd 3'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000000000 in ?? ()
(gdb) 

2.用file命令来确定,如下例子:

[xuzhina@localhost ~]$ ls -l core.22625 
-rw-------. 1 xuzhina xuzhina 16257024 Sep  5 23:50 core.22625
[xuzhina@localhost ~]$ file core.22625 
core.22625: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from '/usr/lib/vmware-tools/sbin64/vmtoolsd -n vmusr --blockFd 3'



确定core文件是由哪个文件产生的方法

标签:调试技术   程序崩溃   linux   x86   

原文地址:http://blog.csdn.net/xuzhina/article/details/42686129

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!