Reverse Engineering Asked by func on January 27, 2021
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?
You can do this using idapython - using ida_hexrays
api:
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.
Answered by R4444 on January 27, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP