def tinfo_for_ea(ea): byte_info = idc.GetTinfo(ea) if byte_info is None: return None t = idaapi.tinfo_t() t.deserialize(idaapi.cvar.idati, byte_info[0], byte_info[1]) return t
def __get_functions(self): functions = list(idautils.Functions()) for start_function in functions: tinfo = idc.GetTinfo(start_function) if tinfo is None: continue mangled_name = idc.GetFunctionName(start_function) demangled = {idc.INF_SHORT_DN: '', idc.INF_LONG_DN: ''} for record in demangled.iteritems(): (type, value) = record demangled[type] = idc.Demangle(mangled_name, idc.GetLongPrm(type)) ida_type, ida_fields = tinfo yield models_ida.IdaRawFunctions( start=start_function, end=idc.GetFunctionAttr(start_function, idc.FUNCATTR_END), ida_type=ida_type, ida_fields=ida_fields, mangled_name=mangled_name, short_name=demangled[idc.INF_SHORT_DN], long_name=demangled[idc.INF_LONG_DN])
def __get_names(self): names = list(idautils.Names()) for record in names: ea, name = record ida_info = idc.GetTinfo(ea) if ida_info is None: continue ida_type, ida_fields = ida_info yield models_ida.IdaRawName(name=name, address=ea, ida_type=ida_type, ida_fields=ida_fields)
def tinfo(self): '''The tinfo of the function type''' return idc.GetTinfo(self.startEA)
def ti_changed(self, ea, type, fname): type = idc.GetTinfo(ea) self._send_event(TiChangedEvent(ea, type)) return 0