In Ida pseudo-code when I press at stack's variable I can see the place of this variable in stack.
char buffer[XXX]; // [sp+YYh]
How can I get that information (buffer size and place of this buffer in stack) in IDAPython?
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.Sign up to join this community
You can do this using idapython - using
ida_hexrays.init_hexrays_plugin() for var in ida_hexrays.decompile(ea).get_lvars(): # offset offset = -stack_size + var.get_stkoff() # variable size size = var.width # variable type type = var.tif
And in ida gui, you can see the comments beside declarations.