
Run Code Conditionally
2-20
Run code conditionally
Try executing this loop one more time. Take a look at this code; it’s doing a lot
of work with a variable named i. You may want to check the value of i at specific
points instead of after each statement. To do this, you set software breakpoints
at the statements you’re interested in and then initiate a conditional run.
First, clear out the WATCH window so that you won’t be distracted by any
superfluous data items.
Delete the first three data items from the WATCH window (don’t watch
them anymore):
wd 3
wd 1
wd 1
The variable i was the fourth item added to the WATCH window in the previous
tutorial step, and it should now be the only remaining item in the window.
Set up for the conditional run examples:
1) Set software breakpoints at lines 72 and 74.
2) Reset the program entry point:
restart
3) Run the first part of the program:
go main
Now initiate the conditional run:
run i<10
This causes the debugger to run through the loop as long as the value of i is
less than 10. Each time the debugger encounters the breakpoints in the loop,
it updates the value of i in the WATCH window.
Summary of Contents for TMS320C6 Series
Page 10: ...x ...
Page 20: ...xx ...
Page 118: ...4 20 ...
Page 144: ...6 16 ...
Page 164: ...7 20 ...
Page 170: ...8 6 ...
Page 284: ...B 18 ...
Page 290: ...C 6 ...