set variable

This command evaluates an expression and assigns the result to a variable, register or memory.

Show/hideSyntax

set [variable] expression

Where:

expression

Specifies an expression and assigns the result to a variable, register or memory address.

Show/hideExample

Example 117. set variable

set variable myVar=10                               # Assign 10 to variable myVar
set variable $PC=0x8000                             # Assign address 0x8000 to
                                                    # PC register
set variable $CPSR.N=0                              # Clear N bit
set variable (*(int*)0x8000)=1                      # Assign 1 to address 0x8000
set variable *0x8000=1                              # Assign 1 to address 0x8000
set variable strcpy((char*)0x8000,"My String")      # Assign string to address 0x8000
set variable memcpy(void*)0x8000,{10,20,30,40},4)   # Assign array to address 0x8000

Show/hideSee also

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