[plt-scheme] Debugger: How much work to implement?
As far as single-stepping is concerned... There is certainly a
performance hit, but it is no more than in any other naive
implementation of a single stepper -- a function call and
semaphore-wait every step.
Currently, MzTake makes a function call, does a hash lookup, and a few
other things at a breakpoint. In a single-stepping "mode", MzTake
could easily be engineered/streamlined to not do the "other things" at
each break and simply provide every lexically-scoped binding.
Of course, some single steps are silly expansions and could
potentially be skipped, but this is dependent on John's backend rather
than MzTake.
The next version of MzTake will have this feature since it's almost
trivial to implement. The only constraint is the time I (don't) have
to sit down with the code and actually do it.
Jono
On Thu, 7 Oct 2004 18:10:31 +0200, ifconfig nslookup
<configurator at gmail.com> wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> On Wed, 6 Oct 2004 13:23:57 -0400, John Clements
> <clements at brinckerhoff.org> wrote:
> >
> > On Oct 6, 2004, at 1:10 PM, Eric Kidd wrote:
> >
> > > Thank you for your information!
> > >
> > > On Thu, 23 Sep 2004 11:38:22 -0400, John Clements
> > > <clements at brinckerhoff.org> wrote:
> > >> Two of these are tricky in the current mzscheme framework:
> > >> single-stepping (without destroying performance), and evaluation of an
> > >> expression in a given source location's scope. Neither is impossible.
> > >
> > > Hmm. I'd be interested in hearing a little about these issues. It
> > > might be tolerable to destroy performance if that's the only way to
> > > solve the problem in a reasonable amount of time--we're not
> > > constrained by Scheme performance at all, so a further decrease might
> > > be only semi-noticable.
> >
> > Let me clarify: the problem is not that performance would suffer while
> > single-stepping: as you point out, performance doesn't matter at that
> > point. The problem is that the performance of the target program would
> > suffer (probably seriously) even when not in single-stepping mode.
>
> A simple (maybe not programmatically simple, but logically simple)
> solution exists for that problem: Create two Execute buttons, one with
> single-stepping enabled and one that can't single-step but runs much
> faster.
>
> ifconfig.
>
>
>
> >
> > I'm not saying this problem can't be solved. I'm just saying that the
> > naive solution would probably not be tolerably efficient.
> >
> > >> The rest is supported by the debugger back-end which is freely
> > >> available--though not what you might call "polished", or even really
> > >> "finished"--this is also the back-end used by mztake.
> > >
> > > Is there documention for this, or should I read the source?
> >
> > You might be interested in this paper:
> >
> > http://www.ccs.neu.edu/scheme/pubs/index.html#esop2001-cff
> >
> > ... which covers the basic idea of annotating a source program into one
> > which tracks its own information using continuation-marks.
> >
> > Beyond this, you should examine the MzTake system, and its accompanying
> > documentation.
> >
> >
> >
> > >> You should also be aware of the "errortrace" library, which provides
> > >> only source positions but is useful for many debugging tasks.
> > >
> > > I'll have a look. Thanks!
> > >
> > > -Eric
> >
> >
> >
>