This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: guile-vm-0.0


Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:

> The procedure above *is* a closure.  I'll wait with looking carefully
> at your VM until I've done some things I've promised to do, but I
> assume there will be one chunk of byte code per closure.

Right.

> What I'm suggesting is that apart from this chunk, we store a chunk of
> debugging information.  Such information could contain a table which
> for every Scheme level expression in the closure contains a reference
> to the Scheme expression itself (or its position in a source file)
> plus an index into the chunk of byte codes.
> 
> While single-stepping through the function, it is possible to have the
> debugging version of the VM detect when you have reached the byte code
> on next index, and make an exception.
> 
> My guess is that this is, in principle, what GDB does.  (Except that
> it probably either sets a hardware breakpoint or replaces the
> instruction at the index with a trap usually, and emulates the CPU
> only when having set watchpoints.)

I see, and it's certainly possible.  Now I guess we can build a GDB-like
debugging system (and more) for Guile extension languages.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]