Hi All,

I'm using gdb to debug a C code which does file processing.
The file i'm processing has about 100,000 records.
The code runs fine until the 30,000 records and after that it produces garbage value. Could i use gdb to run the code until it reaches 30,000 records and then set breakpoints from the 30,000 records onwards to analyze the variables causing the garbage value?


in the condition part of the break, can i use variables declared within my C program. Wat i mean is , i have a variable to count the no of records, can i use the same variable?

I did try using the variable,but the gdb seems to be debuggin from Record 1.. Not sure wats happening..

The record counter is a 2-byte integer and it should be a 4-byte long to prevent overflow at record 32767 - possibly! ;-)

i have declared the counter as long unsigned int