lua-users home
lua-l archive

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


>    The parameters of the function can only be obtained in the call hook.  But
>    the actual use of it is usually  in the line hook, such as the  breakpoint
>    hit to see what parameters of the function. Now I want to do this, I  need
>    to activate the call hook at any  time and record the number of  arguments
>    to all  the  functions  on  the call  stack.  This  can  seriously  affect
>    performance.
> 
>    Is it possible to make ftransfer/ntransfer valid in line hook?

For parameters, ftransfer is always 1; you can get ntransfer with
the expression 'debug.getinfo(1, 'u').nparams'.

-- Roberto