From 7a4b162b7a897e913d2086f865cfb48b3f4a5ce8 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Thu, 20 Sep 2018 19:02:40 +0430 Subject: forgot the new xml file --- bruiser/autogen/wasm/ltg/luwasm.xml | 174 ++++++++++++++++++++++++++++++++++++ bruiser/lua-scripts/wasmtest.lua | 18 ++++ 2 files changed, 192 insertions(+) create mode 100644 bruiser/autogen/wasm/ltg/luwasm.xml create mode 100644 bruiser/lua-scripts/wasmtest.lua (limited to 'bruiser') diff --git a/bruiser/autogen/wasm/ltg/luwasm.xml b/bruiser/autogen/wasm/ltg/luwasm.xml new file mode 100644 index 0000000..3e10a40 --- /dev/null +++ b/bruiser/autogen/wasm/ltg/luwasm.xml @@ -0,0 +1,174 @@ + + + + + + + 1 + + + + + + + + 2 + + + + + + + + 3 + + + + + + + + 4 + + + + + + + + 5 + + + + + + + + 6 + + + + + + + + 7 + + + + + + + + 8 + + + + + + + 9 + + + + + + + + 10 + + + + + + + + 11 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + 0 + 1 + 2 + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bruiser/lua-scripts/wasmtest.lua b/bruiser/lua-scripts/wasmtest.lua new file mode 100644 index 0000000..a287b01 --- /dev/null +++ b/bruiser/lua-scripts/wasmtest.lua @@ -0,0 +1,18 @@ + +function demo4() + local a = getwasmobj("/home/bloodstalker/devi/hell2/bruiser/autogen/wasm/ft/test.wasm") + print(a) + print(type(a)) + for k, v in pairs(a) do + print(k, v, type(k), type(v)) + end + print("type section:") + io.write(tostring(a["type_section"]:id()).."\n") + io.write(tostring(a["type_section"]:payloadlength()).."\n") + io.write(tostring(a["type_section"]:namelength()).."\n") + io.write(tostring(a["type_section"]:name()).."\n") + io.write(tostring(a["type_section"]:count()).."\n") + io.write(tostring(a["type_section"]:entries()).."\n") +end + +demo4() -- cgit v1.2.3