|
Yes - this is very easy and straight forward task with debug.sethook() (see e. g. Roberto's book "Programming in Lua" ... I think at several points there). You really SHOULD do this in your C interface to avoid that the Lua user can "hang up your C core software".