Skip to content

Commit 1a80d64

Browse files
committed
fix
1 parent fddab87 commit 1a80d64

File tree

5 files changed

+48888
-1
lines changed

5 files changed

+48888
-1
lines changed

linux/core文件/core文件.txt

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
环境:centos 8
3+
默认生成的core文件在/var/lib/systemd/coredump/目录中
4+
5+
修改为当前目录
6+
ulimit -c unlimited
7+
echo "core-%e-%p-%t" > /proc/sys/kernel/core_pattern
8+
9+
10+
demo.c
11+
-------------------
12+
#include <stdio.h>
13+
14+
int main()
15+
{
16+
char* bad_point=NULL;
17+
*bad_point = 99;
18+
return 0;
19+
}
20+
-------------------
21+
22+
gcc -g demo.c -o demo
23+
gdb demo core-demo-3193716-1681897652
24+

0 commit comments

Comments
 (0)