示例#1
0
def _variable_name(ea):
    """Return the name of a variable."""
    try:
        flags = ida_bytes.get_full_flags(ea)
        if ida_bytes.has_name(flags):
            return ida_name.get_ea_name(ea)
    except:
        pass
    return ""
示例#2
0
def _function_name(ea):
    """Try to get the name of a function."""
    try:
        flags = ida_bytes.get_full_flags(ea)
        if ida_bytes.has_name(flags):
            return ida_funcs.get_func_name(ea)
    except:
        pass
    return "sub_{:x}".format(ea)
示例#3
0
 def name(self):
     ea = self.address()
     try:
         flags = ida_bytes.get_full_flags(ea)
         if ida_bytes.has_name(flags):
             return ida_name.get_ea_name(ea)
     except:
         pass
     return ""