lua-users home
lua-l archive

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

I'm trying to write a sort of trace tool in lua.  I'm using lua 4.0.

Should I be able to use getlocal(2, i) from within a callhook?

I'm using the dblib function setcallhook to set my callhook, which is
written in lua.

What I see is that getlocal(2, i) always returns nil (when called from
my callhook).

I can tell my callhook function is more or less ok because I can call it
directly from some function and it correctly gets the local variable
information, but when it is called as a callhook it can't get the local
variable information.

Is this just a restriction of callhook and getlocal that I wasn't aware