From e040ff88ba02058192f90503f6270d72fddd8d41 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 4 Mar 2018 22:02:55 +0330 Subject: the jmp table is working now. you get member set and get methods, and an iterator. you can demo2 in the lua scripts folder for a test. --- bruiser/lua-scripts/demo2.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'bruiser/lua-scripts') diff --git a/bruiser/lua-scripts/demo2.lua b/bruiser/lua-scripts/demo2.lua index fc50cc1..de13c58 100644 --- a/bruiser/lua-scripts/demo2.lua +++ b/bruiser/lua-scripts/demo2.lua @@ -61,6 +61,9 @@ setmetatable(jmp_s_t, {__call = function(self, arg1,arg2,arg3,arg4,arg5,arg6,arg return t end}) +setmetatable(jmp_s_t, {__index = function(self, arg1) +end}) + function jmp_s_t:show(msg) print(msg, self, self:custom()) return self @@ -84,14 +87,14 @@ end function integ_test() local text_section = xobj.getTextSection() - local head = jmp_s_t.new() - head = getjmptable(#text_section, text_section) + local head = getjmptable(#text_section, text_section) head:show("XXXXXhead is") - print(head:location()) - --while head:next() ~= nil do - for i=1,11,1 do - head = head:next() + print("head location is ", head:location()) + while head:inext() ~= nil do + --for i=1,11,1 do head:show("next is") + head = head:inext() + --if head:type() == 0 then break end end end -- cgit v1.2.3