,大概是调用到了4,5次的时候把,这是子函数内部的写函数,我往文件fp里写,已经写完了,打算去关闭的时候出现的。而且fp的值是有的,很奇怪,望高手指点
75 fclose(fp);
(gdb) p fp
$21 = (FILE *) 0x603fd0
(gdb) p fclose(fp)
Program received signal SIGSEGV, Segmentation fault.
0x0000003a8b25ff39 in fclose@@GLIBC_2.2.5 () from /lib64/libc.so.6
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(fclose@plt) will be abandoned.
When the function is done executing, GDB will silently stop.
慕运维8079593
拉丁的传说
相关分类