[Vm-dev] Exploring the simulator (was Re: REPL image for simulation)

Ben Coman btc at openinworld.com
Mon May 23 16:06:40 UTC 2016


On Mon, May 23, 2016 at 3:14 AM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
>> On May 22, 2016, at 9:43 AM, Ben Coman <btc at openinworld.com> wrote:
>>
>>> On Sat, May 21, 2016 at 4:44 AM, Clément Bera <bera.clement at gmail.com> wrote:
>>>
>>>> On Fri, May 20, 2016 at 7:29 PM, Ben Coman <btc at openinworld.com> wrote:
>>>>
>>>> On Fri, May 20, 2016 at 8:44 PM, Clément Bera <bera.clement at gmail.com> wrote:
>>>
>>> Normally if you build a cog development image:
>>> $ svn co http://www.squeakvm.org/svn/squeak/branches/Cog/image
>>> $ cd ./image
>>> $ ./buildsqueaktrunkvmmakerimage.sh
>>>
>>> You have multiple scripts available with comments to run the simulator that work out of the box. It should take a couple minutes to get it working. Then the easiest is to simulate a REPL image to easily debug what you want.
>>
>> Hi Clement,
>>
>> Could you point me to such a REPL image?
>>
>> cheers -ben

>
> Hi Ben,
>
>     see buildspurreaderimage.sh, or it may be buildspurtrunkreaderimage.sh, in the image directory.

Thanks Eliot.  I now have an "Input please" window.  I presume I
should type Smalltalk expressions in there.  For a while it was
confusing that I could see no effect entering...
   3+4
or...
  Transcript show:'hello'

Nothing moving in the Simulator's trace pane, nor the Transcript
within the simulation, nor the host's Transcript, but after selecting
menu item "print instructions each instruction" I see 3+4 produce a
stream of instructions in the host transcript.

With such a long list of menu items, I expect now I'll bug everyone to
discover what they all are.  I'll use this thread to log random things
I discover for posterity for myself and other VM newcomers.  There
doesn't seem a lot of info out there on the simulator and maybe some
will spark some short comments, but I don't expect feedback on
everything.

But first, what are a few important menu or workflow items a VM
newcomer working with the REPL image would find useful?

cheers -ben

P.S. After running ./buildspurtrunkreaderimage.sh
this is the code I ran in the host image...
| cos |
cos := CogVMSimulator newWithOptions: #(Cogit
StackToRegisterMappingCogit "SimpleStackBasedCogit"
ObjectMemory Spur32BitCoMemoryManager
"ISA ARMv5" "ISA IA32").
"cos initializeThreadSupport."
cos desiredNumStackPages: 8.
cos openOn: 'spurreader.image'.
cos openAsMorph; run


More information about the Vm-dev mailing list