This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Displaying values in a loop


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]