IDA: Fix idc.SetType elides leading underscores from parameter names (#78)
This commit is contained in:
@@ -29,7 +29,13 @@ def SetFunctionType(addr, sig):
|
|||||||
SetType(addr, sig)
|
SetType(addr, sig)
|
||||||
|
|
||||||
def SetType(addr, cppType):
|
def SetType(addr, cppType):
|
||||||
ret = idc.SetType(addr, cppType)
|
if not cppType.endswith(';'):
|
||||||
|
cppType += ';'
|
||||||
|
tinfo = idc.parse_decl(cppType,idaapi.PT_RAWARGS)
|
||||||
|
if not(tinfo is None):
|
||||||
|
ret = idc.apply_type(addr,tinfo)
|
||||||
|
if ret is None:
|
||||||
|
ret = idc.SetType(addr, cppType)
|
||||||
if ret is None:
|
if ret is None:
|
||||||
print('SetType(0x%x, %r) failed!' % (addr, cppType))
|
print('SetType(0x%x, %r) failed!' % (addr, cppType))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user