Hi, I want to use jit.util.funcinfo in a script of mine to find people using cheats detouring debug.getinfo. I havent really used it and I don't really understand how it's done exactly. I see it's used as such
jit.util.funcinfo(func, pc)
I don't know pc, and I just wish to know how exactly it's used, it's args, if it's efficient to run jit on, etc
Thanks!
[QUOTE=EvacX;42433640][url]http://stackoverflow.com/questions/7167566/luajit-2-optimization-guide[/url] Geoff Leyland's reply, read that.[/QUOTE]
[url]http://wiki.luajit.org/JIT-Compiler-API[/url] found this while looking into it
I assume jit needs to be on for this to work? jit.on()? or command parameters?
hi
Jit doesn't need to be on to use this. I'm not sure about the second parameter, but if you feed it a function then it'll give you back a table of information similar to debug.getinfo.
[CODE]
> PrintTable(jit.util.funcinfo(print))
addr = 1773317824
ffid = 25
upvalues = 1
> local print = print _G.print = function(...) print(...) end
> PrintTable(jit.util.funcinfo(print))
linedefined = 1
currentline = 1
params = 0
stackslots = 2
source = @lua_run
lastlinedefined = 1
children = false
upvalues = 1
nconsts = 0
isvararg = true
loc = lua_run:1
bytecodes = 5
gcconsts = 0
[/CODE]
Oh, thanks guys. :)
Sorry, you need to Log In to post a reply to this thread.