Hi,
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?
Thanks.
Ang Beepeng
On Tue, Mar 23, 2010 at 7:14 AM, Ang BeePeng beepeng86@yahoo.com wrote:
Hi,
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.".
Gulik.
On Tue, Mar 23, 2010 at 11:32:43AM +1300, Michael van der Gulik wrote:
On Tue, Mar 23, 2010 at 7:14 AM, Ang BeePeng beepeng86@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".
Try putting a self halt in Interpreter>>primitiveAdd, which should be called when you evaluate "3+4".
The main interpreter loop is Interpreter>>interpret, which fetches bytecodes and evaluates them. You can probably put a break in InterpreterSimulator>>dispatchOn:in: which is called by #interpret and simulates the big case statement that the interpreter loop uses to dispatch bytecodes for execution.
Dave
David T. Lewis wrote:
Try putting a self halt in Interpreter>>primitiveAdd, which should be called when you evaluate "3+4".
Or is it bytecodePrimAdd?
David T. Lewis wrote:
The main interpreter loop is Interpreter>>interpret, which fetches bytecodes and evaluates them. You can probably put a break in InterpreterSimulator>>dispatchOn:in: which is called by #interpret and simulates the big case statement that the interpreter loop uses to dispatch bytecodes for execution.
I can easily debug the InterpreterSimulator from the beginning. But, to move from the very beginning to the point where I can debug "3+4" would be very far, long, right? Or are there any way that I can do, to just skip to the part that I'm interested with.
Thank you so much for you help.
Thanks.
Ang Beepeng
Hi,
Here's a page, step by step guide to get InterpreterSimulator work, hope it helps.
http://askoh.com/mwiki/index.php?title=Squeak_Virtual_Machine#Interpreter_Si...
Thanks.
Ang Beepeng
On Tue, Mar 23, 2010 at 4:24 PM, Ang BeePeng beepeng86@yahoo.com wrote:
Hi,
Here's a page, step by step guide to get InterpreterSimulator work, hope it helps.
http://askoh.com/mwiki/index.php?title=Squeak_Virtual_Machine#Interpreter_Si...
That is awesome!
Can I ask very nicely if somebody could put the resulting image up on http://squeakvm.org in an appropriately findable place, preferably with a workspace set up with cool bits of code?
Does it specifically need VM version 3.9.2?
Cheers, Gulik.
Michael van der Gulik-2 wrote:
That is awesome!
Can I ask very nicely if somebody could put the resulting image up on http://squeakvm.org in an appropriately findable place, preferably with a workspace set up with cool bits of code?
Does it specifically need VM version 3.9.2?
Hi, I have a http://askoh.com/mwiki/images/b/be/InterpreterSimulator.zip InterpreterSimulator set up. Unzip, and you can play around with it already. Please let me know if you have any problem with it.
I think it does need 3.9 VM specifically, you can search previous nabble post about this.
Thanks.
Ang Beepeng
Michael van der Gulik-2 wrote:
That is awesome!
Can I ask very nicely if somebody could put the resulting image up on http://squeakvm.org in an appropriately findable place, preferably with a workspace set up with cool bits of code?
Does it specifically need VM version 3.9.2?
Hi, I have a http://askoh.com/mwiki/images/b/be/InterpreterSimulator.zip InterpreterSimulator set up. Unzip, and you can play around with it already. Please let me know if you have any problem with it.
I think it does need 3.9 VM specifically, you can search previous nabble post about this.
Thanks.
Ang Beepeng
On Mon, Mar 29, 2010 at 4:25 AM, Ang BeePeng beepeng86@yahoo.com wrote:
Michael van der Gulik-2 wrote:
That is awesome!
Can I ask very nicely if somebody could put the resulting image up on http://squeakvm.org in an appropriately findable place, preferably with a workspace set up with cool bits of code?
Does it specifically need VM version 3.9.2?
Hi, I have a http://askoh.com/mwiki/images/b/be/InterpreterSimulator.zip InterpreterSimulator set up. Unzip, and you can play around with it already. Please let me know if you have any problem with it.
I think it does need 3.9 VM specifically, you can search previous nabble post about this.
This is awesome! :-). I'm amazed that computers are fast enough to run this on a FULL image these days!!!
It runs kind of okay on my 3.11 Linux VM. There seems to be a font problem; the workspace isn't drawing any text, although you can select it where text is meant to be. Also event handling is a bit odd; the VM doesn't seem to react even though CPU usage on the machine is near 0%.
Are you willing to tidy this up enough for putting on e.g. ftp.squeak.org? I think this image is a great asset! It needs:
* You don't need the "package-cache", "sm" and "cs" directories. All that stuff is in the image already. * You can delete SqueakDebug.log. * I don't know what the file .DS_store is, but its optional too. * There's a halt in InterpreterSimulator>>lookupMethodInClass:
If you aren't willing to do this, I'll see if I can find free time this week.
Gulik.
Michael van der Gulik-2 wrote:
This is awesome! :-). I'm amazed that computers are fast enough to run this on a FULL image these days!!!
It runs kind of okay on my 3.11 Linux VM. There seems to be a font problem; the workspace isn't drawing any text, although you can select it where text is meant to be. Also event handling is a bit odd; the VM doesn't seem to react even though CPU usage on the machine is near 0%.
Are you willing to tidy this up enough for putting on e.g. ftp.squeak.org? I think this image is a great asset! It needs:
- You don't need the "package-cache", "sm" and "cs" directories. All
that stuff is in the image already.
- You can delete SqueakDebug.log.
- I don't know what the file .DS_store is, but its optional too.
- There's a halt in InterpreterSimulator>>lookupMethodInClass:
If you aren't willing to do this, I'll see if I can find free time this week.
Hi,
I will do that.
Halt in lookupMethodInClass: is done on purpose I believe. I'm not sure if it is ok to remove it.
Thanks.
Ang Beepeng
On 29.03.2010, at 00:50, Michael van der Gulik wrote:
On Mon, Mar 29, 2010 at 4:25 AM, Ang BeePeng beepeng86@yahoo.com wrote:
Michael van der Gulik-2 wrote:
That is awesome!
Can I ask very nicely if somebody could put the resulting image up on http://squeakvm.org in an appropriately findable place, preferably with a workspace set up with cool bits of code?
Does it specifically need VM version 3.9.2?
Hi, I have a http://askoh.com/mwiki/images/b/be/InterpreterSimulator.zip InterpreterSimulator set up. Unzip, and you can play around with it already. Please let me know if you have any problem with it.
I think it does need 3.9 VM specifically, you can search previous nabble post about this.
This is awesome! :-). I'm amazed that computers are fast enough to run this on a FULL image these days!!!
It runs kind of okay on my 3.11 Linux VM. There seems to be a font problem; the workspace isn't drawing any text, although you can select it where text is meant to be. Also event handling is a bit odd; the VM doesn't seem to react even though CPU usage on the machine is near 0%.
Are you willing to tidy this up enough for putting on e.g. ftp.squeak.org? I think this image is a great asset! It needs:
- You don't need the "package-cache", "sm" and "cs" directories. All
that stuff is in the image already.
- You can delete SqueakDebug.log.
- I don't know what the file .DS_store is, but its optional too.
- There's a halt in InterpreterSimulator>>lookupMethodInClass:
If you aren't willing to do this, I'll see if I can find free time this week.
Gulik.
Same here - runs fine on the latest Mac VM, but StrikeFonts do not show correctly.
You should remove the Windows VM from the zip, it's not needed. Anyone interested in this work will have a VM already ;-)
- Bert -
Michael van der Gulik-2 wrote:
the workspace isn't drawing any text, although you can select
Hi,
Sorry, I miss this sentence previously. The text will show up after awhile. Sometimes, I'll need to rerun InterpreterSimulator for the text in workspace to show up. I tried to type, highlight and printIt, it's fine.
So, that means I remove those files, win VM, leave the image untouched. Is that ok?
Thanks.
Ang Beepng
On Tue, Mar 30, 2010 at 4:51 AM, Ang BeePeng beepeng86@yahoo.com wrote:
Michael van der Gulik-2 wrote:
the workspace isn't drawing any text, although you can select
Hi,
Sorry, I miss this sentence previously. The text will show up after awhile. Sometimes, I'll need to rerun InterpreterSimulator for the text in workspace to show up. I tried to type, highlight and printIt, it's fine.
So, that means I remove those files, win VM, leave the image untouched. Is that ok?
Yes, for now. Then I'll ask the web team if we can upload it to ftp.squeak.org.
I'll see if I can work out why the StrikeFonts aren't working.
Gulik.
Hi,
Here you go. http://askoh.com/mwiki/index.php?title=Special:Upload&wpDestFile=Interpr...
Thanks for your help.
Ang Beepeng
On 30.03.2010, at 05:15, Ang BeePeng wrote:
Hi,
Here you go. http://askoh.com/mwiki/index.php?title=Special:Upload&wpDestFile=Interpr...
Actually:
http://askoh.com/mwiki/images/5/50/InterpreterSimulator-image.zip
You only forgot to remove squeak.ini which is only used by the Windows VM.
On the Mac it works with a 4.2.3 VM, but not the experimental 5.0 VM.
- Bert -
On 2010-03-30, at 3:43 AM, Bert Freudenberg wrote:
You only forgot to remove squeak.ini which is only used by the Windows VM.
On the Mac it works with a 4.2.3 VM, but not the experimental 5.0 VM.
Really? So what happens?
- Bert -
-- =========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
On 30.03.2010, at 20:26, John M McIntosh wrote:
On 2010-03-30, at 3:43 AM, Bert Freudenberg wrote:
You only forgot to remove squeak.ini which is only used by the Windows VM.
On the Mac it works with a 4.2.3 VM, but not the experimental 5.0 VM.
Really? So what happens?
Some error when it's trying to simulate directory fetching.
- Bert -
Er, well a bit more information? Or point to a image/changes I can try?
On 2010-03-31, at 8:46 AM, Bert Freudenberg wrote:
On 30.03.2010, at 20:26, John M McIntosh wrote:
On 2010-03-30, at 3:43 AM, Bert Freudenberg wrote:
You only forgot to remove squeak.ini which is only used by the Windows VM.
On the Mac it works with a 4.2.3 VM, but not the experimental 5.0 VM.
Really? So what happens?
Some error when it's trying to simulate directory fetching.
- Bert -
-- =========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
On 31.03.2010, at 18:10, John M McIntosh wrote:
Er, well a bit more information? Or point to a image/changes I can try?
You snipped that from my last mail. Need coffee? ;)
http://askoh.com/mwiki/images/5/50/InterpreterSimulator-image.zip
- Bert -
On 2010-03-31, at 8:46 AM, Bert Freudenberg wrote:
On 30.03.2010, at 20:26, John M McIntosh wrote:
On 2010-03-30, at 3:43 AM, Bert Freudenberg wrote:
You only forgot to remove squeak.ini which is only used by the Windows VM.
On the Mac it works with a 4.2.3 VM, but not the experimental 5.0 VM.
Really? So what happens?
Some error when it's trying to simulate directory fetching.
- Bert -
--
John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
ABSOLUTELY need more coffee, still recovering from an allnighter to get WikiServer on the iPad.
On 2010-03-31, at 9:18 AM, Bert Freudenberg wrote:
On 31.03.2010, at 18:10, John M McIntosh wrote:
Er, well a bit more information? Or point to a image/changes I can try?
You snipped that from my last mail. Need coffee? ;)
http://askoh.com/mwiki/images/5/50/InterpreterSimulator-image.zip
- Bert -
-- =========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
Ok, I was looking at this problem Bert said:
"Some error when it's trying to simulate directory fetching."
First when you click to get a world menu it comes up white no data for the menu rows. I tested on a 4.2.5 and back to a 3.8.21 with the same behavior so it that what happens on windows & linux?
That makes it hard to pick the file dialog, so Bert do you have some smalltalk code that fails I could try in the simulator workspace?
On 2010-03-30, at 3:43 AM, Bert Freudenberg wrote:
On 30.03.2010, at 05:15, Ang BeePeng wrote:
Hi,
Here you go. http://askoh.com/mwiki/index.php?title=Special:Upload&wpDestFile=Interpr...
Actually:
http://askoh.com/mwiki/images/5/50/InterpreterSimulator-image.zip
You only forgot to remove squeak.ini which is only used by the Windows VM.
On the Mac it works with a 4.2.3 VM, but not the experimental 5.0 VM.
- Bert -
-- =========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
vm-dev@lists.squeakfoundation.org