lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




2014-12-08 20:18 GMT-08:00 Thomas Jericke <tjericke@indel.ch>:

My dubugger works like this. The hook yields from any line, when you resume the program it may call lua_resume on a lua_state standing at any possible instruction.

I also have the metamethod case, as I have some callable objects which yield on call.
--
Thomas


So that suggests your debugger runs a debugged program as a coroutine, and invokes yield in the debug hooks. And it calls lua_resume to continue running the debugged program after completing the debug affairs. Do I understand correctly?

Is this your debugger's specific implementation, or is this the recommended way of Lua to implement a debugger (or only way, or most orthodox way)?

Thank you,
Dong