|Debugging not working while running works [message #903393]
||Thu, 23 August 2012 09:22
| Quint Missing name
Registered: August 2012
I've been having problems debugging my code in Eclipse. For some reason debugging does not work. Building an executable works fine. I can run it in terminal but when I want to debug, it crashes. Here is my simple code.
static const char filename = "test.txt";
FILE *file = fopen ( filename, "r" );
if ( file != NULL )
char line [ 128 ];
while ( fgets ( line, sizeof line, file ) != NULL )
fputs ( line, stdout );
fclose ( file );
perror ( filename );
The debugger runs until fopen and than it crashes and says:
Can't find a source file at "../sysdeps/wordsize-64/../../libio/iofopen.c"
Locate the file or edit the source lookup path to include its location.
This while normally running the code (ctrl+F11) does give the desired result. Also running the executable in terminal gives the desired result. Anyone have ideas?
Powered by FUDForum
. Page generated in 0.13018 seconds