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