Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the Lua hook mechanism to capture assert failures and unprotected calls #899

Closed
TerryE opened this issue Jan 3, 2016 · 1 comment
Assignees

Comments

@TerryE
Copy link
Collaborator

TerryE commented Jan 3, 2016

@pjsg has proposed a very specific implementation of an unprotect call handler, which I feel is an unnecessary imposition on Lua developers in general. However, it seems reasonable to ask for some standard mechanism for hooking into this for purposes of debugging. Lua already has a standard API exposed for this in the form of the lua_sethook() and related calls.

I suggest that we introduce the following API constants LUA_MASKUNPROTCALL and LUA_MASKASSERT into the core code so that the lua_sethook() API call can be used to establish hooks for these events which the extra logic to implement them. Developers are then free to set these hooks with their own custom code, and Phlip can then develop his own debug library should he wish to without imposing this implementation on all developers who wish to use the nodeMCU firmware.

@TerryE
Copy link
Collaborator Author

TerryE commented Apr 11, 2016

I feel that #1119 has really superseded this, so I will close this one -- especially as it has received no comments or interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants