Beispiel #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 ""
Beispiel #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)
Beispiel #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 ""