[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debugging plans
From: |
Neil Jerram |
Subject: |
Re: Debugging plans |
Date: |
29 Jun 2001 17:26:37 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> "Martin" == Martin Grabmueller <address@hidden> writes:
>> From: Neil Jerram <address@hidden> Date: 28 Jun 2001
>> 22:44:17 +0100
>>
>> This allows for many kinds of breakpoint specification, for
>> example [...]
Martin> I like this very much. It's schemey and looks like it's
Martin> quite flexible.
Thanks! I think Marius is also correct, that it's inefficient for
some simple breakpoints, but we can mix and match.
>> (Perhaps it would be better if these procedures simply returned
>> non-#f to indicate that their caller should then do
>> (debug-stack stack); this way the procedures could be logically
>> composed.)
Martin> I'm not sure about it. Maybe we should try out the
Martin> #f/non-#f returning variants first, because it offers more
Martin> flexibility.
Sorry, which way are you arguing for ??. (I think you mean the
non-(#f/non-#f returning) variants.)
>> Things like gdb's `tb +1' could be done by adding a hook
>> procedure that automatically removed itself after being called
>> once. Does anyone know how to implement a hook procedure that
>> can remove itself?
Martin> First I thought about implementing the hook procedures
Martin> like this [...]
Martin> but then I noticed that `proc' above is not known, because
Martin> it is any of the elements of the hook. Hmmm. It seems
Martin> that the hook implementation is not the Right Thing for
Martin> breakpoints.
Yes, perhaps we need something other than hooks. But it seems like an
uncharacteristic (for Scheme) language limitation that it isn't
possible to construct a closure that includes a reference to itself.
Are we missing something?
Martin> Another possibility would be that the breakpoint
Martin> procedures do not remove themselves from the hook but
Martin> rather disable themselves when they don't want to be
Martin> called again. This could be done with a simple flag
Martin> variable.
Good idea.
Martin> Don't know if all this helps, but you asked for it.
Yes :-) and I appreciate your input - thanks!
Neil