lua-users home
lua-l archive

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

Thomas Lauer wrote:
Rici Lake <> wrote:

debugger for Lua
<rest snipped>

Very nice.

Two quick comments: I have a patched version of Lua with a "continue"
statement which clashes with your continue statement. I am not at all
suggesting that you change your stuff just because of that (it's easy to
do this locally). However, "continue" might at some point be a reserved
word in Lua. (There's always hope.)

I guess that underlines Roberto's point about changing the Lua grammar.
I would say that if you add a keyword to Lua, you're going to have to
expect problems like that. For example, I use a serialization function
which outputs {key = value} if key matches [A-Za-z_][A-Za-z0-9]* and is
not one of the keywords from the refman; otherwise it uses {["key"] = value}. This noticeably speeds up data input, and the keyword check is
a simple cut and paste from the refman, so I can change it easily
(in one place) if a future version of lua has more or different
keywords. One has to take responsibility for one's own modifications,
I think, and I say that as someone who is famously eager to make such

Second, in line 354 you have "info = getinfo(base + level, "nSluf")"
This should be "local info...", right? I saw this while I tried to get
ldb working with my Strict module. (Thanks to ldb I even discovered a
bug in my code.)

Yes, I had already noticed that, but thanks. The fix will get checked in
today or tomorrow when I check in the breakpoint code. Did you try
filing a ticket in CVSTrac, by the way? Is the process too awkward?
I'm evaluating CVSTrac for a lightweight version control system, so
I'm curious.

Other than that it works beautifully for me. Unfortunately, I am working
more on the C side of things currently. Still, it's a valuable tool.

ldb is designed to be usable from C as well. I've been using it that
way since I started it. If you look at ldbglue.c, you'll find a simple
function which can be called directly from the gdb command line (I
presume that other debugging tools let you do that as well.) It's
really made my life easier in debugging C modules; being able to
flip into a Lua-aware stack inspector is quite handy.

Thanks for the kind words.