[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: string.dump strip option (5.2 request)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 26 Feb 2008 15:29:55 -0300
> Good. Just a quick question (haven't read the above thread thoroughly
> myself). Is possible to strip the debug information off the generated
There's C code and instructions for that in
> withDbgInfo = string.dump(aFunction)
> noDbgInfo = strip_debuf_info(withDbgInfo)
> just by manipulating the byte stream?
You could do it in Lua but you'd have to parse the bytecode stream. Not fun.
On the other hand, in the current bytecode format, the debug info is the last
section dumped, and so if aFunction does not include other functions, it's
a matter of removing the tail of the bytecode string. The problem, of course,
is finding out where that tail starts...