在86位pe / elf中,此代码有效:
ea=ScreenEA()
stack = GetFrame(ea)
size = GetStrucSize(stack)
names = []
for i in xrange(size):
n = GetMemberName(stack, i)
if n and not n in names:
names.append(n)
print names
但在64位应用程序中,堆栈中的值为'变量无效并获得异常:
Expected an ea_t type
Traceback (most recent call last):
File "\IDA Pro Advanced Edition v6.1\python\idaapi.py", line 373, in IDAPython_ExecScript
execfile(script, g)
File "F:/123.py", line 11, in <module>
size = GetStrucSize(stack)
File "\IDA Pro Advanced Edition v6.1\python\idc.py", line 4760, in GetStrucSize
return idaapi.get_struc_size(sid)
File "\IDA Pro Advanced Edition v6.1\python\idaapi.py", line 25013, in get_struc_size
return _idaapi.get_struc_size(*args)
TypeError: Expected an ea_t type
如何在64位中获取帧?
版本:
IDA 6.1
IDAPython 1.5
Python 2.6.6