Centos调试Core文件

Centos调试Core文件

配置生成core文件

[root@hadoop3 build]# ulimit -c
0
[root@hadoop3 build]# ulimit -c unlimited

安装调试工具

  • 修改/etc/yum.repos.d/CentOS-Debuginfo.repo文件enable=1
  • 安装 debuginfo-install glibc-2.17-323.el7_9.x86_64

调试命令

[root@hadoop3 build]# gdb ./zero_array_test core.29966
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-110.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/>...
Reading symbols from /home/hero/code/testcase/build/zero_array_test...(no debugging symbols found)...done.
[New LWP 29966]
Core was generated by `./zero_array_test'.
Program terminated with signal 11, Segmentation fault.
#0  strchrnul () at ../sysdeps/x86_64/strchrnul.S:33
33              movdqa  (%rdi), %xmm0
(gdb) bt
#0  strchrnul () at ../sysdeps/x86_64/strchrnul.S:33
#1  0x00007f6c778166e1 in __find_specmb (format=0x4 <Address 0x4 out of bounds>) at printf-parse.h:109
#2  _IO_vfprintf_internal (s=0x7f6c77b96400 <_IO_2_1_stdout_>, format=0x4 <Address 0x4 out of bounds>, ap=ap@entry=0x7ffeaa16b9b8) at vfprintf.c:1308
#3  0x00007f6c77821539 in __printf (format=<optimized out>) at printf.c:34
#4  0x0000000000400787 in main ()
(gdb) list
28              punpcklbw %xmm1, %xmm1
29              andq    $~15, %rdi
30              pxor    %xmm2, %xmm2
31              punpcklbw %xmm1, %xmm1
32              orl     $0xffffffff, %esi
33              movdqa  (%rdi), %xmm0
34              pshufd  $0, %xmm1, %xmm1
35              subq    %rdi, %rcx
36              movdqa  %xmm0, %xmm3
37              leaq    16(%rdi), %rdi
(gdb)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值