lua-users home
lua-l archive

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


> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> Behalf Of Roberto Ierusalimschy
> Sent: zaterdag 6 april 2013 21:26
> To: Lua mailing list
> Subject: Re: question on debug hooks
> 
> > I read that and already figured it would be opcode instructions. But
> > in the case when a number is provided, the mask is ignored, but still
> > checked. From what I read I tried a nil value for mask, but that
> > failed with a "string expected" error.
> 
> The mask is not ignored when a number if provided, as your own example
> showed (hooks are called for every line *and* for every n-th instruction).
> 

Ok thx. Now I get it. Rereading the manual; it does exactly say that, but maybe;

*if mask contains a 'c':  the hook is called every time Lua calls a function;
*if mask contains a 'r':  the hook is called every time Lua returns from a function;
*if mask contains a 'l':  the hook is called every time Lua enters a new line of code.
 ^^^^^^^^^^^^^^^^^^ <- added

With a count different from zero, the hook is also called after every count instructions. 
                                     added -> ^^^^

Would be clearer. Anyway thx for pointing me in the right direction.
Thijs