-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
(1) ulimit -a로 core file size 확인. Core dump Size 무제한 설정
ulimit -c unlimited
(2) 저장 위치 설정 (/var/core/ 폴더가 만들어져 있어야 함)
echo /var/core/core.%e > /proc/sys/kernel/core_pattern
Dump를 하지 않으려면
echo |/bin/false > /proc/sys/kernel/core_pattern
(3) 프로그램 실행후 crach가 가면 core dump 파일이 저장 되었는지 확인
ls -al /var/core/
(4) gdb 실행
gdb ./"실행파일" /var/core/core."실행파일"\ default.31003
(5) call stack 확인
bt
(6) 종료
q
Reactions are currently unavailable