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
- Host: GitHub
- URL: https://github.com/siffiejoe/lua-lbci
- Owner: siffiejoe
- Created: 2015-06-29T17:48:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-30T10:52:07.000Z (over 10 years ago)
- Last Synced: 2023-03-25T11:52:01.386Z (almost 3 years ago)
- Topics: bytecode, introspection, lua
- Language: C
- Homepage:
- Size: 160 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.lbci
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)
-------------------------------------------------------------------------------