strace addr2line 定位coredump

x86 linux 64位上没有验证成功

 

test.c

#include <stdio.h>

int main()

{

  //just for test

  int* pTest = NULL;

  *pTest = 3;

  return 0;

}

 

gcc test.c -o  test

strace -i ./test

[000073bcd2c05cfb] munmap(0x73bcd2bcc000, 69303) = 0
[00005e658ef9513d] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
[????????????????] +++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

addr2line -e test 00005e658ef9513d

??:0

 

posted @ 2024-04-07 14:36  HenryLiuY  阅读(1)  评论(0编辑  收藏  举报