An open API service indexing awesome lists of open source software.

https://github.com/siffiejoe/lua-lbci

lhf's Lua byte code inspector library as a rock
https://github.com/siffiejoe/lua-lbci

bytecode introspection lua

Last synced: about 1 month ago
JSON representation

lhf's Lua byte code inspector library as a rock

Awesome Lists containing this project

README

          

This is a bytecode inspector library for Lua 5.2. It allows you to look
inside Lua functions from Lua.

To try the library, just edit Makefile to reflect your installation of Lua and
then run make. This will build the library and run a simple test. Note that
this library needs inside information from the Lua private headers and so it
needs to be built using a Lua build directory, not just the usual installation
directories.

There is no manual but the library is simple and intuitive; see the summary
below. Read also test.lua, which show the library in action.

This code is hereby placed in the public domain.
Please send comments, suggestions, and bug reports to lhf@tecgraf.puc-rio.br .

-------------------------------------------------------------------------------

inspector library:
getconstant(f,i) getinstruction(f,i) setconstant(f,i,v)
getfunction(f,i) getlocal(f,i)
getheader(f,i) getupvalue(f,i)

-------------------------------------------------------------------------------