[threads] At shutdown, don't wait for native threads that aren't calling Mono (...
[mono-project.git] / sdks / wasm / print-table.py
blob189fc2bc7b8a6daff781d19f6cf145aeb8c40383
1 #!/usr/bin/env python3
4 # print-table.py: Print the function table for a webassembly .wast file
7 import sys
9 prefix=" (elem (i32.const 1) "
11 if len(sys.argv) < 2:
12 print ("Usage: python print-table.py <path to mono.wast>")
13 sys.exit (1)
15 f = open (sys.argv [1])
16 table_line = None
17 for line in f:
18 if prefix in line:
19 table_line = line[len(prefix):]
20 break
22 for (index, v) in enumerate (table_line.split (" ")):
23 print ("" + str(index) + ": " + v)
24 index += 1