示例#1
0
def name(id, string, *suffix):
    '''Set the name of the structure identified by ``id`` to ``string``.'''
    res = (string, ) + suffix
    string = interface.tuplename(*res)

    res = idaapi.validate_name2(buffer(string)[:])
    if string and string != res:
        logging.warn(
            "{:s}.name : Stripping invalid chars from structure name \"{:s}\". : {!r}"
            .format(__name__, string, res))
        string = res
    return idaapi.set_struc_name(id, string)
示例#2
0
    def name(self, string):
        '''Set the name for the structure to ``string``.'''
        if isinstance(string, tuple):
            string = interface.tuplename(*string)

        res = idaapi.validate_name2(buffer(string)[:])
        if string and string != res:
            logging.warn(
                "{:s}.name : Stripping invalid chars from structure name {!r}. : {!r}"
                .format('.'.join((__name__, self.__class__.__name__)), string,
                        res))
            string = res
        return idaapi.set_struc_name(self.id, string)
示例#3
0
 def name(self, name):
     return idaapi.set_struc_name(self.id, name)
示例#4
0
 def name(self, name):
     return idaapi.set_struc_name(self.id, name)
示例#5
0
 def __call__(self):
     idaapi.set_struc_name(self.sid, self.new_name.encode('utf-8'))
示例#6
0
def name(id, name=None):
    """set/get the name of a particular structure"""
    if name is None:
        return idaapi.get_struc_name(id)
    return idaapi.set_struc_name(id, name)
示例#7
0
 def __call__(self):
     idaapi.set_struc_name(self.sid, self.new_name)
示例#8
0
 def __call__(self):
     idaapi.set_struc_name(idc.get_struc_id(self.oldname.encode('utf-8')),
                           self.newname.encode('utf-8'))