[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Difficulties in using ftransfer/ntransfer.
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 14 Oct 2019 13:56:35 -0300
> 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