From c85d93f505f53f921dd2d7b2d774ff75979261f7 Mon Sep 17 00:00:00 2001 From: plafosse Date: Thu, 7 Jul 2016 21:44:20 -0400 Subject: Adding DemangleMS API and extending types for C++ --- python/__init__.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'python/__init__.py') diff --git a/python/__init__.py b/python/__init__.py index 0c983fe2..fbe6fa61 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -5646,6 +5646,26 @@ def get_time_since_last_update_check(): def updates_checked(): core.BNUpdatesChecked() +def get_qualified_name(names): + out = "" + for i,a in enumerate(names): + if i == 0: + out += a + else: + out += "::" + a + return out + +def demangle_ms(arch, mangledName): + handle = ctypes.POINTER(core.BNType)() + outName = ctypes.POINTER(ctypes.c_char_p)() + outSize = ctypes.c_ulonglong() + names = [] + if core.BNDemangleMS(arch.handle, mangledName, ctypes.byref(handle), ctypes.byref(outName), ctypes.byref(outSize)): + for i in xrange(outSize.value): + names.append(outName[i]) + return (Type(handle), names) + return (None, mangledName) + bundled_plugin_path = core.BNGetBundledPluginDirectory() user_plugin_path = core.BNGetUserPluginDirectory() -- cgit v1.3.1