[SOLVED] Debugging not working while running works [message #903401] |
Thu, 23 August 2012 13:42 |
Quint Missing name Messages: 5 Registered: August 2012 |
Junior Member |
|
|
Hi,
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.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
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 );
}
else
{
perror ( filename );
}
return 0;
}
The debugger runs until fopen and than it crashes and says:
Quote: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?
[Updated on: Thu, 30 August 2012 12:58] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03420 seconds