[e-lang] Debugging?

Kevin Reid kpreid at mac.com
Mon Oct 1 20:54:24 EDT 2007


On Oct 1, 2007, at 19:32, Raoul Duke wrote:

> hi,
>
> [I'm totally new, I did search around but didn't find anything yet,
> but maybe this is already answered somewhere, sorry if so...]
>
> How do people debug E programs? Is there an interactive debugger that
> can be used (and ideally that works well)?

Debugging E programs:

1. Causeway

Causeway is a post-mortem debugger (operating on logs produced by the  
program) displaying which turns caused which other turns.

http://www.erights.org/elang/tools/causeway/index.html

2. Host debugging

E programs can be examined by the host platform (Java, CL, ...)'s  
debugging mechanisms. This is not especially pleasant in E-on-Java  
since the E code is interpreted, not compiled.

3. Printing

Good ol' "printf debugging". Your options here are to either pass  
around stderr so that you can get to it in the code; or you can send  
messages to the tracelog with this gimmick:

   throw <- ("your trace here")

4. Virtualization

This is the intended full interactive debugging mechanism for E.

A vat is created whose implementation includes debugging support --  
most likely, it is implemented using objects living in a normal vat.  
The "host" vat can therefore run code which examines the "debug-vat"  
objects and execution state to examine/step/modify them.

The unique property of debugging access is that it allows the vat to  
be suspended and examined in the middle of a turn.

I'd like to provide URLs for previous explanations, but I can't find  
anything good. This might help:

http://www.google.com/search?q=site:eros-os.org+e-lang+debug

This hasn't been done yet because it requires what I'll call a "full  
VM" implementation of E: there must be no immediate callbacks from  
primitive code to E objects, as that would make interruption impossible.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list