Inspect Registers
To have a look at a particular register, use the command print $[register_name]
For example,
print $r0print can be abbreviated to p
print $r1
print $pc
p $r0
p $r1
p $pc
Change Register Values
Use the command print $[register_name] = [value]
For example,
print $r0 = 10Again, the abbreviation p can be used in place of print
print $r1 = 0x20
print $pc = _start
Formatting Output
Format can be specified by using /[symbol] after the print command. Possible symbols are:
a for addressFor example
x for hexadecimal
d for signed decimal
u for unsigned decimal
o for octal
t for binary ('two')
c for character
f for floating point
print/a $pcprint/x $r0p/c $r1p/t $cpsr(Use the last command to check the NZCV and interrupt flags)
No comments:
Post a Comment