[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: LUA debugger and conditional breakpoints
- From: Benoit Germain <bgermain@...>
- Date: Thu, 11 Jul 2002 15:02:47 +0200
I'll have a got at this after I get the current implementation to work, so
that I can benchmark both versions.
> -----Original Message-----
> From: Thomas Lavergne [mailto:thomas.lavergne@laposte.net]
> Sent: jeudi 11 juillet 2002 14:32
> To: Multiple recipients of list
> Subject: Re: LUA debugger and conditional breakpoints
>
>
> Benoit Germain wrote:
> > I had a look at ldb, and the author implements breakpoints
> in a similar
> > fashion, and talks about "simulated local environment". His
> breakpoints are
> > of the form "function dummy (args) block end", evaluated,
> then lua_ref'ed,
> > and when a breakpoints location is hit, the reference is
> read and the
> > function evaluated. The author also uses lua_beginblock() and
> > lua_endblock(), which seems 3.x-specific. What does it do ?
> I suppose it is
> > equivalent to the pair int top = lua_gettop(L) /
> lua_settop(L,top) ? I also
> > see that when evaluating an expression, ldb takes all
> locals of the current
> > context, and makes globals of them, saving the masked global's value
> > somewhere, and restores those values after the expression
> is evaluated. Is
> > there really no other means to access local values ? I will
> do the same if
> > it is the only way, but if there is another solution I am
> interested :-)
>
> You could also change the global table when you evaluate the
> exp, with a
> table with a 'index' tag method. This tag method can search
> first in the
> local environement if he can found the requested value, if he can't
> found it he search in the old global table.
>
>
> --
> Thomas Lavergne "Le vrai rêveur est
> celui qui rêve
> de l'impossible."
> (Elsa Triolet)
> thomas.lavergne@laposte.net
> d-12@laposte.net ICQ:#137121910
> http://assoc.wanadoo.fr/thallium/
>