while

This command enables you to write scripts with conditional loops that execute debugger commands.

Show/hideSyntax

while condition
   ...
   optional_commands
   ...
end

Where:

condition

Specifies a conditional expression. Follow the while statement with one or more debugger commands that execute repeatedly while condition evaluates to true.

optional_commands

Specifies optional commands that can also be used inside the while statement to change the loop behavior:

loop_break

Exit the loop.

loop_continue

Skip the remaining commands and return to the start of the loop.

Enter each debbuger command on a new line and terminate the while command by using the end command.

Show/hideExample

Example 152. while

# Define a while loop containing commands to conditionally execute
set variable myVar=0
while myVar<10
    s
    x
    myVar++
end

Show/hideSee also

Copyright © 2010, 2011 ARM. All rights reserved.ARM DUI 0452D
Non-ConfidentialID011411