为何无法产生core文件?
有一程序:
/* Name: mycore.c */
#include <stdio.h>
int main(void)
{
char *x = 0x0;
*x = 1;
printf("%s", x);
strcpy(x, "This is wrong");
return 0;
}
用gcc -g mycore.c编译后,运行./a.out提示segmentation fault.但是没有看到core文件生成,因此用gdb ./a.out core调试时,提示没有core文件.