about summary refs log tree commit diff stats
path: root/miasm2/core/objc.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/core/objc.py')
-rw-r--r--miasm2/core/objc.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/miasm2/core/objc.py b/miasm2/core/objc.py
index 3fe0e9fe..eb169040 100644
--- a/miasm2/core/objc.py
+++ b/miasm2/core/objc.py
@@ -35,7 +35,13 @@ def objc_to_str(objc, result=None):
             result += "[%d]" % objc.elems
             objc = objc.objtype
         elif isinstance(objc, ObjCPtr):
-            result = "(*%s)" % result
+            if not result and isinstance(objc.objtype, ObjCFunc):
+                result = objc.objtype.name
+            if isinstance(objc.objtype, (ObjCPtr, ObjCDecl, ObjCStruct, ObjCUnion)):
+                result = "*%s" % result
+            else:
+                result = "(*%s)" % result
+
             objc = objc.objtype
         elif isinstance(objc, (ObjCDecl, ObjCStruct, ObjCUnion)):
             if result: