- 论坛徽章:
- 0
|
本帖最后由 fighter10383 于 2010-07-06 11:03 编辑
这样是会引发异常的,生成的core文件信息如下:
**************************************************
***@****:~/dllerrdemo> gdb main core
GNU gdb 6.3
Copyright 2004 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 "i586-suse-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
Core was generated by `./main'.
Program terminated with signal 11, Segmentation fault.
warning: current_sos: Can't read pathname for load map: 输入/输出错误
Reading symbols from /usr/lib/libcwait.so...done.
Loaded symbols for /usr/lib/libcwait.so
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/zxin10/lib/libdlldemo.so...done.
Loaded symbols for /home/zxin10/lib/libdlldemo.so
#0 0x400a340c in memcpy () from /lib/tls/libc.so.6
(gdb) where
#0 0x400a340c in memcpy () from /lib/tls/libc.so.6
#1 0x4001b694 in fun_dll () from /home/zxin10/lib/libdlldemo.so
#2 0x08048544 in main () at main.c:33 |
|