MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / _demangle

Method _demangle

python/demangle.py:375–399  ·  view source on GitHub ↗
(self, ctxt, arch, name, out_type, out_var_name, view)

Source from the content-addressed store, hash-verified

373 return False
374
375 def _demangle(self, ctxt, arch, name, out_type, out_var_name, view):
376 try:
377 api_arch = CoreArchitecture._from_cache(arch)
378 api_view = None
379 if view is not None:
380 api_view = binaryview.BinaryView(handle=core.BNNewViewReference(view))
381
382 result = self.demangle(api_arch, core.pyNativeStr(name), api_view)
383 if result is None:
384 return False
385 type, var_name = result
386
387 if not isinstance(var_name, types.QualifiedName):
388 var_name = types.QualifiedName(var_name)
389
390 Demangler._cached_name = var_name._to_core_struct()
391 if type:
392 out_type[0] = core.BNNewTypeReference(type.handle)
393 else:
394 out_type[0] = None
395 out_var_name[0] = Demangler._cached_name
396 return True
397 except:
398 log_error(traceback.format_exc())
399 return False
400
401 def _free_var_name(self, ctxt, name):
402 try:

Callers

nothing calls this directly

Calls 6

demangleMethod · 0.95
_to_core_structMethod · 0.95
log_errorFunction · 0.85
BinaryViewMethod · 0.80
QualifiedNameMethod · 0.80
_from_cacheMethod · 0.45

Tested by

no test coverage detected