change_stkvar_name

summary: change the name of an existing stack variable

description:

The goal of this script is to demonstrate some usage of the type API. In this script, we demonstrate a way to change the name of a stack variable: * Get the function object surrounding cursor location. * Use this function to retrieve the corresponding frame object. * Find the frame member matching the given name. * Using its offset in the frame structure object, calculate

the actual stack delta.

  • Use the previous result to redefine the stack variable name if it is not a special or argument member.

level: advanced

Functions

rename_stkvar(func_ea, old_name, new_name)

Module Contents

change_stkvar_name.rename_stkvar(func_ea, old_name, new_name)