if

This command enables you to write scripts that conditionally execute debugger commands.

Show/hideSyntax

if condition
   ...
else
   ...
end

Where:

condition

Specifies a conditional expression. Follow the if statement with one or more debugger commands that execute when the expression evaluates to true.

Note

The else statement is optional and the debugger commands that follow it only execute when condition evaluates to false.

Enter each debugger command on a new line and terminate the if command by using the end command.

Show/hideExample

Example 41. if

# Define an if statement containing commands to conditionally execute
if $pc==0x80000
    break
    info stack full
end

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0452L
Non-ConfidentialID100912