4

I have a variable called var_14h in disassemble code. I want to rename this variable. I try to rename the variable by using the following

afvn var_14h i

However, radare complains and returns an error:

Cant find var by name

When i just execute afv the variable is listed:

var int64_t var_14h @ rbp-0x14

I've tried to refer using rbp-0x14, [var_14h], however, nothing seems to work. What am i missing?

1 Answer 1

3

I think the order of names changed a while ago but if you're using latest from git (which you should) the order is reversed

[0x00005850]> afv?
Usage: analyze function arguments/locals
...
| afvn [new_name] ([old_name]) rename argument/local
| afvt [name] [new_type] change type for given argument/local
| afv-([name]) remove all or given var
[0x00005850]>

So in your case afvn i var_14h.

Your Answer

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

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