News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

[solved] how to set a loop counter for debugging?

Started by cbuser2, November 20, 2012, 12:45:55 PM

Previous topic - Next topic

cbuser2

Hi all.

If I have a loop, how can I set a counter to process the loop X times? I don't want to manually step through the loop X times. VC++ has an option for this, so does CB also have this option? It is a very convenient way to check the values of variables after a loop has done X times iterations.

EDIT: Basically what I want to do is to set a breakpoint in(or outside) a loop with the condition that the program breaks after X iterations of the loop.

Thanks in advance.

Martin K.

edit breakpoint, Ignore count before break

Martin

cbuser2


ollydbg

See this image:

Also, you can see this manual about conditional breakpoint: http://www.delorie.com/gnu/docs/gdb/gdb_34.html
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.