[yichi@localhost ~]$ gdb a.out
GNU gdb Red Hat Linux (6.5-15.fc6rh)
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".
(gdb) run a.out
Starting program: /home/yichi/a.out a.out
Program received signal SIGFPE, Arithmetic exception.
0x0804837d in main () at test.c:11
11 tmp=i/j;
(gdb) generate-core-file
Saved corefile core.27470
(gdb)