I am working on recover.c and I need to debug my code by watching the variable states. However, stepping through the program 400 times in a loop is not very easy, how can I set up the debugger so that it will pause the execution of the program only when a variable reaches a certain value?
do
{
fseek(rawFile, seekValue, SEEK_SET );
picSizebyChunks++;
fread(buffer, sizeof(unsigned char),4, rawFile);
seekValue+=CHUNK_SIZE;
}while( !((signatureMatch(buffer))&&picSizebyChunks>1) );
Like for the above code, I want to start debugging when picSizebyChunks reaches 400. How can I set that?