aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2019-06-14 08:49:11 +0000
committerbloodstalker <thabogre@gmail.com>2019-06-14 08:49:11 +0000
commit81bfe1367bd935d27e0ef3123c3b1df756e98d7c (patch)
tree3be831d88febe47cc1495630b2be9783cabb3e81
parentfixed a bug where string dumps where out of order. custom sections are gettin... (diff)
downloaddwasm-81bfe1367bd935d27e0ef3123c3b1df756e98d7c.tar.gz
dwasm-81bfe1367bd935d27e0ef3123c3b1df756e98d7c.zip
improved import section output with --dbgsection
-rwxr-xr-xparse.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/parse.py b/parse.py
index e4e9403..2ef2a95 100755
--- a/parse.py
+++ b/parse.py
@@ -858,8 +858,22 @@ class PythonInterpreter(object):
print(Colors.green + 'module str: ' + repr(iter.module_str) + Colors.ENDC)
print(Colors.red + 'field length: ' + repr(iter.field_len) + Colors.ENDC)
print(Colors.purple + 'field str: ' + repr(iter.field_str) + Colors.ENDC)
+ print(Colors.purple + 'field str: ' + ''.join([chr(elem) for elem in iter.field_str]) + Colors.ENDC)
print(Colors.yellow + 'kind: ' + repr(iter.kind) + Colors.ENDC)
print(Colors.grey + 'type: ' + repr(iter.type) + Colors.ENDC)
+ if (type(iter.type) == Table_Type):
+ print('element_type: ' + repr(iter.type.element_type))
+ print('limit: ' + repr(iter.type.limit))
+ print('flags: ' + repr(iter.type.limit.flags))
+ print('initial: ' + repr(iter.type.limit.initial))
+ print('maximum: ' + repr(iter.type.limit.maximum))
+ if (type(iter.type) == Global_Type):
+ print('value_type: ' + repr(iter.type.content_type))
+ print('mutability: ' + repr(iter.type.mutability))
+ if (type(iter.type) == Memory_Type):
+ print('flags: ' + repr(iter.type.limits.flags))
+ print('flags: ' + repr(iter.type.limits.initial))
+ print('flags: ' + repr(iter.type.limits.maximum))
# function_section
if module.function_section is not None and (dbgsection == "function" or all):