设为首页 加入收藏

TOP

gdb调用程序崩溃时的内存镜像core文件
2015-07-20 17:18:03 来源: 作者: 【 】 浏览:3
Tags:gdb 调用 程序 崩溃 时的 内存 core 文件
/*
 * gcc gdb_test.c -o gdb_test -g
 * ./gdb_test 
 * Segmentation fault (core dumped)
 * gdb gdb_test -c core.5521 
 * Core was generated by `gdb_test'.
 * Program terminated with signal 11, Segmentation fault.
 * #0  0x000000000040048b in main (argc=1, argv=0x7fff00c0b438) at gdb_test.c:18
 * 18		*ptr='\n';
 */
#include
  
   
#include
   
     #include
    
      int main(const int argc,const char *argv[]) { char *ptr=NULL; *ptr='\n'; return 0; } /* * add follow in the ~/.bashrc file to generate core file * ulimit -c unlimited */
    
   
  

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇POJ 2185 Milking Grid (二维KMP .. 下一篇POJ 1041 John's trip (欧拉..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·如何理解c语言指针和 (2025-12-27 01:19:11)
·为什么C标准库没有链 (2025-12-27 01:19:08)
·玩转C语言和数据结构 (2025-12-27 01:19:05)
·MySQL 基础入门视频 (2025-12-26 23:20:22)
·小白入门:MySQL超详 (2025-12-26 23:20:19)