¶øÇÒ ÎÒÔÚ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 ±à¼ ]