R0 CREW

Radare2 Frame Pointer Optimization

How do I rename local variables in r2 when the local variables are relative to ESP and not EBP.

I try

afv esp+0x14 AgeVar int

but it instead creates:

; var int AgeVar @ ebp-0x14

MOV EAX, 0xAAAAAAAA
MOV [ESP+0x14], EAX
XOR EAX,EAX
PUSH EAX
MOV EAX, [ESP+0x14] # EAX == ???, not this is not 0xAAAAAAAA

good point

Hollyw00d, it’s a bug. Create github issue plz

afv and afa - right commands for this task

Hi! I really liked the question you raised here! Thanks for asking. Hopefully, we will be able to catch someone who knows the right response to this query!