Exemplo n.º 1
0
 def __call__(self):
     if self.is_enum:
         idaapi.set_enum_name(idaapi.get_enum(self.oldname.encode('utf-8')),
                              self.newname.encode('utf-8'))
     else:
         idaapi.set_enum_member_name(
             idaapi.get_enum_member_by_name(self.oldname.encode('utf-8')),
             self.newname.encode('utf-8'))
Exemplo n.º 2
0
def name(enum, name):
    '''Rename the enumeration `enum` to the string `name`.'''
    eid, res = by(enum), utils.string.to(name)
    return idaapi.set_enum_name(eid, res)
Exemplo n.º 3
0
 def name(self, name):
     """Set the enum name."""
     success = idaapi.set_enum_name(self.eid, name)
     if not success:
         raise exceptions.CantRenameEnum("Cant rename enum {!r} to {!r}.".format(self.name, name))
Exemplo n.º 4
0
 def __call__(self):
     idaapi.set_enum_name(self.tid, self.new_name.encode('utf-8'))
Exemplo n.º 5
0
def name(enum, name):
    '''Rename the enumeration `enum` to `name`.'''
    eid = by(enum)
    return idaapi.set_enum_name(eid, name)
Exemplo n.º 6
0
def name(enum, name):
    '''Rename the enumeration `enum` to the string `name`.'''
    eid, res = by(enum), utils.string.to(name)
    return idaapi.set_enum_name(eid, res)
Exemplo n.º 7
0
def name(identifier, name=None):
    '''Given an enum id, get/set it's /name/'''
    if name is None:
        return idaapi.get_enum_name(identifier)
    return idaapi.set_enum_name(identifier, name)
Exemplo n.º 8
0
def name(enum, name):
    '''Rename the enumeration identified by ``enum`` to ``name``.'''
    eid = by(enum)
    return idaapi.set_enum_name(eid, name)
Exemplo n.º 9
0
 def __call__(self):
     idaapi.set_enum_name(self.tid, self.new_name)