Displaying values in a loop

MVD
2007-04-16T08:36:58Z

Hi All,

I have a situation like below:

intj=0, k=2;

for(int i=0; i< 3 ; i++)
{
j=j+k;
}

Now, suppose I ran GDB and inside for loop I have to use print j and print k
to see the current values.
Does any body have any idea if there is a way to see the values of j and k
,in the for loop each time values are changes with out using "print" ?

Any help would be greatly appreciated.

Regards,
-MVD
--
View this message in context: http://www.nabble.com/Displaying-values-in-a-loop-tf3583092.html#a10012231
Sent from the gdb - General mailing list archive at Nabble.com.