def value(cls, mid): '''Return the value of the enumeration member `mid`.''' if not interface.node.is_identifier(mid): raise E.MemberNotFoundError( u"{:s}.value({:#x}) : Unable to locate member by the specified identifier." .format('.'.join([__name__, cls.__name__]), mid)) return idaapi.get_enum_member_value(mid)
def deleting_enum_member(self, id, cid): ename = idaapi.get_enum_name(id) value = idaapi.get_enum_member_value(cid) serial = idaapi.get_enum_member_serial(cid) bmask = idaapi.get_enum_member_bmask(cid) self._send_event(EnumMemberDeletedEvent(ename, value, serial, bmask)) return 0
def enum_member_created(self, id, cid): ename = idaapi.get_enum_name(id) name = idaapi.get_enum_member_name(cid) value = idaapi.get_enum_member_value(cid) bmask = idaapi.get_enum_member_bmask(cid) self._send_event(EnumMemberCreatedEvent(ename, name, value, bmask)) return 0
def value(self): """Get the member value""" return idaapi.get_enum_member_value(self.cid)
def value(cls, mid): '''Return the value of the enumeration member `mid`.''' return idaapi.get_enum_member_value(mid)
def value(identifier, value=None, **kwds): '''Given a member id, fetch/set it's /value/''' if value is None: return idaapi.get_enum_member_value(identifier) bmask = kwds.get('mask', -1&mask(enum)) return idaapi.set_enum_member_value(identifier, value, bmask)
def enum_member_deleted(self, id, cid): value = idaapi.get_enum_member_value(cid) serial = idaapi.get_enum_member_serial(cid) bmask = idaapi.get_enum_member_bmask(cid) self._send_event(EnumMemberDeletedEvent(id, value, serial, bmask)) return 0