[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: debug.sethook question
- From: Patrick Donnelly <batrick@...>
- Date: Tue, 20 Apr 2010 16:57:43 -0400
On Tue, Apr 20, 2010 at 4:41 PM, Gedalia Pasternak <gedalia@gmail.com> wrote:
>
> Hi List,
> I've been working on building a run time debugger into my simulation
> system, I'm wondering should the following work:
> debug.sethook (_coroutine, step_line, "l");
> debug.sethook (_coroutine, step_function, "c");
>
> As far as I can tell from walking through the vm code registering "c" blows
> away the "l" function. It seems like this behavior should be documented
> somewhere, I'm wondering what the implications of this might mean to
> debugging multiple threads
Multiplex in the hook function. The first argument is the event:
batrick@neverwinter:~$ lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> debug.sethook(print, "lc")
> do
>> a = 1
>> end
call nil
line 2
line 3
--
- Patrick Donnelly