[Vm-dev] Simulate "3+4" with InterpreterSimulator
Michael van der Gulik
mikevdg at gmail.com
Mon Mar 22 22:32:43 UTC 2010
On Tue, Mar 23, 2010 at 7:14 AM, Ang BeePeng <beepeng86 at yahoo.com> wrote:
> I have a InterpreterSimulator start up, in a workspace I type "3+4". From
> here, I want to step through bytecode per bytecode, when I hit "print". What
> should I do to achieve this?
> Can I debug on the interpreter in the middle of the simulation? Or perhaps I
> need to put a "self halt" somewhere in the VM source?
I don't really know much about the InterpreterSimulator (and congrats
for getting it going! I never got it running...), but...
I would look for a primitive method somewhere which would cause the
simulated environment to stop and pop a debugger up in the host. You
would then evaluate that in the same method as "3+4".
If this primitive method doesn't exist, you could probably quickly
make one that just does "self halt.".
More information about the Vm-dev