diff options
Diffstat (limited to 'python/__init__.py')
| -rw-r--r-- | python/__init__.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/python/__init__.py b/python/__init__.py index 26c8fb5d..f5a46798 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -4151,6 +4151,10 @@ class Type(object): return Type(core.BNCreateUnknownType(unknown_type.handle)) @classmethod + def unknown_type(self, s): + return Type(core.BNCreateUnknownType(s.handle)) + + @classmethod def enumeration_type(self, arch, e, width = None): if width is None: width = arch.default_int_size @@ -10839,6 +10843,21 @@ def demangle_ms(arch, mangled_name): names.append(outName[i]) #core.BNFreeDemangledName(outName.value, outSize.value) return (Type(handle), names) + return (None, mangledName) + + +def demangle_gnu3(arch, mangledName): + handle = ctypes.POINTER(core.BNType)() + outName = ctypes.POINTER(ctypes.c_char_p)() + outSize = ctypes.c_ulonglong() + names = [] + if core.BNDemangleGNU3(arch.handle, mangledName, ctypes.byref(handle), ctypes.byref(outName), ctypes.byref(outSize)): + for i in xrange(outSize.value): + names.append(outName[i]) + #core.BNFreeDemangledName(outName.value, outSize.value) + if not handle: + return (None, names) + return (Type(handle), names) return (None, mangled_name) |
