3

In Arm in the beginning of function

push r4-r6,lr
sub sp sp 0x4

In the end of function

pop r4-r6,pc
add sp sp 0x4

That mean sp is decreased by 4 register*4 bytes+4 bytes for local variables , related to caller function

How do calculate it with Ida Python? I mean calc the offset of stack between 2 function

idc.get_func_attr(ea, idc.FUNCATTR_FRSIZE) retudn only the size of local var, that didn't calculate the size of registers that push to stack

2
  • 1
    idc.get_func_attr(ea, idc.FUNCATTR_FRSIZE)
    – R4444
    Jan 23, 2021 at 19:38
  • 1
    @R4444 that only the size of local var, that didn't calculate the size of registers that push to stack
    – Kolopoi
    Jan 23, 2021 at 20:33

0

Your Answer

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

Browse other questions tagged or ask your own question.