def demangled_name(self): if self.name[0:2] == "_Z": ast = parse(self.name) if ast: return ast.__str__() return self.name
def demangled_name(self): if self.name[0:2] == "_Z": ast = parse(self.name) if ast: return ast.__str__() return self.name
def _try_demangle(name): if name[0:2] == "_Z": try: ast = itanium_demangler.parse(name) except NotImplementedError: return name if ast: return str(ast) return name
def __init__(self, name: str, address: int, symbol_type: str, demangled_name: Optional[str] = None): self.name = name self.address = address self.symbol_type = symbol_type if demangled_name is None: try: self.demangled_name = str(itanium_demangler.parse(name.split('@')[0])) except: self.demangled_name = demangled_name else: self.demangled_name = demangled_name
def _try_demangle(name): if name[0:2] == "_Z": ast = itanium_demangler.parse(name) if ast: return str(ast) return name
def demangle(name): return str(parse(name))
def assertParses(self, mangled, ast): result = parse(mangled) self.assertEqual(result, ast)
def assertDemangles(self, mangled, demangled): result = parse(mangled) if result is not None: result = str(result) self.assertEqual(result, demangled)
def itanium_demangle(s): python_result = itanium_demangler.parse(itanium_demangle_filter(s)) if python_result is not None: python_result = str(python_result) return python_result