红联Linux门户
Linux帮助

_D_GUN_SOURCE 有什么作用阿??和 几个小问题

发布时间:2007-09-10 05:56:25来源:红联作者:yorktown
呵呵! 刚刚接触linux C语言编程 嘿嘿! 麻烦大家了!

而且 我在F7下 gcc -g -D_GUN_SOURCE dd.c -o hello
#include

static void fun(void)
{
char *p=0;
*p='!';
}

int main()
{
fun();
return 0;
}

这个程序是错误的可是使用 ls -l core (ls: 无法访问 core: 没有那个文件或目录) gdb ./hello core 则出现下面
====================================================
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
/home/k/Desktop/c/core: No such file or directory.
(gdb)

====================================================

[ 本帖最后由 yorktown 于 2007-9-10 06:24 编辑 ]
文章评论

共有 0 条评论