def _init_demangled_names(): """ Creates dictionary of demangled names => set of address, that will be used further when user makes double click on methods in Decompiler output. """ demangled_names.clear() for address, name in idautils.Names(): short_name = idc.Demangle(name, idc.INF_SHORT_DN) if short_name: short_name = common.demangled_name_to_c_str(short_name) demangled_names[short_name].add(address - idaapi.get_imagebase()) print("[DEBUG] Demangled names have been initialized")
def init_demangled_names(*args): """ Creates dictionary of demangled names => address, that will be used further at double click on methods got from symbols. """ demangled_names.clear() for address, name in idautils.Names(): short_name = idc.Demangle(name, idc.INF_SHORT_DN) if short_name: short_name = common.demangled_name_to_c_str(short_name) demangled_names[short_name].add(address - idaapi.get_imagebase()) print "[DEBUG] Demangled names have been initialized"
def parse_vtable_name(address): name = idaapi.get_name(address) if idaapi.is_valid_typename(name): if name[0:3] == 'off': # off_XXXXXXXX case return "Vtable" + name[3:], False elif "table" in name: return name, True print "[Warning] Weird virtual table name -", name return "Vtable_" + name, False name = idc.demangle_name(idaapi.get_name(address), idc.INF_SHORT_DN) assert name, "Virtual table must have either legal c-type name or mangled name" return common.demangled_name_to_c_str(name), True
def name(self): name = idaapi.get_name(self.address) if idaapi.is_valid_typename(name): return name name = idc.Demangle(name, idc.get_inf_attr(idc.INF_SHORT_DN)) return common.demangled_name_to_c_str(name)