lua file fixes for linux (hopefully does not break windows)

develop
Warmist 2011-08-08 23:38:09 +03:00
parent 71dc85d35a
commit 056fd51e96
2 changed files with 9 additions and 4 deletions

@ -3,9 +3,9 @@ STD_STRING=0
DWORD=1
WORD=2
BYTE=3
function GetTextRegion()
ranges__=ranges__ or Process.getMemRanges()
--print("Ranges:"..#ranges__)
for k,v in pairs(ranges__) do
--for k2,v2 in pairs(v) do
-- print(string.format("%d %s->%s",k,tostring(k2),tostring(v2)))
@ -15,8 +15,10 @@ function GetTextRegion()
--if(v["read"])then num=num+1 end
--if(v["write"])then num=num+10 end
--if(v["execute"]) then num=num+100 end
--print(string.format("%d %x->%x %s %d",k,v["start"],v["end"],v.name,num))
local pos=string.find(v.name,".text")
--if num>=100 then
--print(string.format("%d %x->%x %s %d",k,v["start"],v["end"],v.name or "",num))
--end
local pos=string.find(v.name,".text") or string.find(v.name,"libs/Dwarf_Fortress")
if(pos~=nil) then
return v;
end

@ -1,3 +1,6 @@
function print(msg)
Console.print(msg.."\n")
end
function err(msg) --make local maybe...
print(msg)
print(debug.traceback())