lua-users home
lua-l archive

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

On 20/06/2012, at 12:28 PM, Paul K wrote:

> Yes, that would work, but I'm developing a stack viewer, which should
> work with any type of stack content and can only do it post factum
> (when the call is already made and without any code modifications). I
> added a check for this case, but wasn't sure if this is the best that
> can be done in this case.

If you add a call hook you can catch the calls as they go past and store your own copy of the stack, and then, with a bit of luck, guess what's up when there's a tail call/return.