Evaluation points can be used with ReplayEngine within certain constraints. Modifying memory is not supported within ReplayEngine. This means that you cannot specify an evaluation that would change the contents of memory. This means you can not for example call a function or change the value of a variable. Other than these constraints, evaluation points are fully supported.

In particular that means that evaluation points of the form

if (myvar == 999) {



are supported. That's a great thing in the following scenario:

You are stepping through a program using ReplayEngine and encounter a loop. You can use next and step to move slowly through the loop and "Run To" and "Run Back To" to go easily to the line before the loop or the line after the loop. However you may have a desire to see what is happening when the program is mid-way through the loop.

If this is the case then you can do this by using "Run Back To" to run to before the loop starts then place a breakpoint in the loop and associate an evaluation point of this form (sometimes called a conditional breakpoint). Often you can use the loop index variable for myvar and whatever loop iteration you desire to see in the place of 999 above. Then hit go and the process will stop at the desired loop iteration. If the loop has many iterations please be patient because the debugger has to evaluate the expression once for each loop iteration.

If the loop is too large the CLI command dhistory -go_time can be used. Using "Run To" and "Run Back To" in conjunction with the straight up dhistory to establish the time values for before the loop starts and after the loop ends. That tells you the range of time values that will correspond to loop iterations. You can pick a numeric value to get to the middle or any other faction of the way though the time spent in that loop. This is less precise but a bit faster for large loops than the evaluation point method.

Josh Carlson

(This post was edited by Chris-TotalView-Tech on Sep 17, 2008, 6:00 PM)