Debugging with GHCi.

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Apr 4 07:02:51 EDT 2006


Simon Marlow <simonmarhaskell at gmail.com> wrote:

> Calling a function on entry to every single BCO would be
> very  costly.
> 
> The interpreter could check before entering a BCO whether there was a 
> breakpoint set on that BCO.  That's nearly equivalent to the 
> implementation I proposed before (overwriting the BCO with a
> breakpoint  object) and might be simpler, I'm not sure.

Just storing a flag byte in the header of every BCO would be very cheap
I imagine.  And there must be some overhead in entering the interpreter
for a BCO anyway, so adding an extra check on the "breakpoint" flag at
the beginning of the interpreter loop should not cause a great slowdown?

Regards,
    Malcolm


More information about the Cvs-ghc mailing list