0

gdb allows setting arbitrary convenience variables:

set $a = "test"
set $b = 3
p $a # => "test"
p $b # => 3

Is there a way to do something similar in radare2? I'd like to be able to e.g.:

set $len = 0x100
px `$len` # => does px 0x100
echo $len # => echos 0x100

1 Answer 1

1

in r2 there's the concept of 'flags' which is basically a way to associate a name to a number.

So in that case you do:

f test = 0x100
px test

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.