Debug interface
The hooks a debugger, profiler or coverage tool attaches to.
sq_setdebughook installs a callback the VM calls as execution moves: on entering and leaving a call, and on each new source line when line hooks are enabled. This hook is enough to build a stepping debugger. sq_stackinfos fills in one frame of the call stack. A stack trace is assembled from these frames.
Line information costs something to emit, so a release build usually leaves it off.
Retrieve the calls stack informations of a ceratain level in the calls stack.
Pops a closure from the stack and sets it as the debug hook, replacing any hook already set, native or not. A null disables it.
Sets the native debug hook. When a native hook is set it overrides any previously set native or non native hooks. if the hook is NULL the debug hook will be disabled.
Tells the VM how to obtain the current OS thread id, which the thread access checks need.
Sets a callback invoked around every script call, for profilers.
Sets a callback the compiler calls per source line, for coverage tools.
Makes redefining an existing global constant an error.