2
这里没有设置断点是我的代码:为什么我可以的fopen在linux
#include <stdio.h>
int main()
{
fopen("./1.txt","r");
printf("hello");
return 0;
}
$ G ++ -g -om的main.cpp
$gdb ./m
(gdb) b fopen
Breakpoint 1 at 0x804842c
(gdb) b printf
Breakpoint 2 at 0x804843c
(gdb) i b
Num Type Disp Enb Address What
1 breakpoint keep y 0x0804842c <[email protected]>
2 breakpoint keep y 0x0804843c <[email protected]>
(gdb) r
似乎断点功能打开从来没有工作,但在printf工作正常。 为什么?
由于
FWIW,'gdb-7.4'已于数周前发布。 – 2012-02-06 05:46:56
嗨,我已经提出了另一个问题库的答案,谢谢。 http://stackoverflow.com/questions/9156414/why-lib32-libc-so-6-has-two-fopen-symbol-in-it – camino 2012-02-06 06:36:57