S.l.e!ep.¢%

像打了激速一样,以四倍的速度运转,开心的工作
简单、开放、平等的公司文化;尊重个性、自由与个人价值;
posts - 1098, comments - 335, trackbacks - 0, articles - 1
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

用gdb在正常状态下生成coredump

Posted on 2011-06-14 21:16 S.l.e!ep.¢% 阅读(717) 评论(0)  编辑 收藏 引用 所属分类: Unix
用gdb在正常状态下生成coredump
来源: ChinaUnix博客  日期: 2008.12.21 16:07 (共有0条评论) 我要评论
 
Is it possible to get a core dump of a running process and it’s symbol table?
Is it possible to get gdb or use some other tools to create a core
dump of a running process and it's symbol table? It would be great if
there's a way to do this without terminating the process.
If this is possible, what commands would you use?  (I'm trying to do this on a Linux box)
Answer
$ ulimit -c unlimited
$ gdb --pid=26426
(gdb) gcore
Saved corefile core.26426
(gdb) detatch

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理