From
http://forum.world.st/Oops-I-put-a-halt-in-a-startup-method-td3800163.html :
My image appears for an instant and then crashes. Is there any way to
recover from this?
I made some progress, but I'm not sure I'm on the right track...
I built a debug VM and found primitivePerform, which is apparently called
by the following:
FeaturesDB perform: #startUp: with: resuming
How will I know which call to skip/break on? Maybe there is there a way,
from the VM side, to get the receiver class name as a string? If I knew that
the receiver was FeaturesDB, that would be the one...
And then once I have the right call, can I just skip over it?
Sean
--
View this message in context: http://forum.world.st/Fwd-Oops-I-put-a-halt-in-a-startup-method-tp3800729p3…
Sent from the Smalltalk VM - Beginners mailing list archive at Nabble.com.
Hi guys. Last days I needed to migrate some old code I used to have in the
VM for tracing objects usage. Luc Fabresse wanted also to be able to set
and get the value of a bit in the object header to do some experiments.
So...we thought it was a good idea to make it abstract an public. So....the
following is only one morning work we did together with Luc, so don't
expect that much. What we did is to do a very small change in the VM to use
one free bit in the object header, and then we coded 3 primitives: one to
get the value, one to set it and one to unmark all objects. The idea is
that you can use this code and give semantics to the bit. This is just for
experimenting and prototypes, not for production code since such bit in the
object header may not be available.
To download:
Gofer it
url: 'http://ss3.gemstone.com/ss/ExperimentalBit';
package: 'ConfigurationOfExperimentalBit';
load.
Now.... you can read ConfigurationOfExperimentalBit
class comment:
---------------
ExperimentalBit is a small facade for setting and getting the value of a
bit in the Object Header. It requires a special VM which supports the
primitives to set and get the value of such bit. You can get a already
compiled MacOSX VM from:
https://gforge.inria.fr/frs/download.php/30042/CogMTVM-ExperimentalBit.zip.
For more details read class comment of ExperimentalBitHandler.
If you already have a compiled VM with the required primitives, then you
can just load the image side part evaluating:
((Smalltalk at: #ConfigurationOfExperimentalBit) project version: '1.0')
load.
If you want to build a VM with the primitives we need, you need to download:
((Smalltalk at: #ConfigurationOfExperimentalBit) project version: '1.0')
load: 'VMMakerGroup'.
And then follow the steps to build the VM:
- http://code.google.com/p/cog/
- http://code.google.com/p/cog/wiki/Guide
-----------
And here ExperimentalBitHandler class comment:
-----------
ExperimentalBitHandler is a small facade for setting and getting the value
of a bit in the Object Header. It requires a special VM which supports the
primitives to set and get the value of such bit. You can get a already
compiled MacOSX VM from:
https://gforge.inria.fr/frs/download.php/30042/CogMTVM-ExperimentalBit.zip.
To know which version of the VM you have to use to compile, check the
dependencies in ConfigurationOfExperimentalBit and also the 'description'
of it. For example, if version 1.0 it depends on 'CogVM' version '3.7'. In
the description of version 1.0 you can also read that the used Git version
of the platform code was 4a65655f0e419248d09a2502ea13b6e787992691 from the
blessed repo.
Basically, there are 3 operations: set the bit to a specific, get the value
of the bit and turn off the bit of all objects. Examples:
'aString' experimentalBit: true.
'astring ' experimentalBit.
Date today experimentalBit: false.
Date today experimentalBit.
ExperimentalBitHandler turnOffExperimentalBitOfAllObjects.
For more details see ExperimentalBitTest.
-------------
Happy Christmats for all the Smalltalk hackers!!!
--
Mariano
http://marianopeck.wordpress.com
Hi guys!
In the past few days i tried to get InterpreterSimulator running without
success.
First of all, a little context about my goal: I'm digging into the VM
because i would like to be able to delegate to some class (that I'll
develop) the responsibility for, say, the method lookup algorithm.
With that in mind, here's what i've been doing:
Using the Pharo 1.2 image Mariano Peck's prepared in his exellent article
(http://marianopeck.wordpress.com/2011/04/23/how-to-debug-the-vm/), loaded
the VMMaker package with the following script:
Deprecation raiseWarning: false.
Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfCog';
load.
(Smalltalk at: #ConfigurationOfCog) project latestVersion load.
Once it finishes (without errors) I "Save As" the current image as
"demo.image", close it and open the original Pharo 1.2 image that Mariano
provided.
When, for example, I run:
(CogVMSimulator new openOn: 'demo.image') test
or
(InterpreterSimulatorLSB new openOn: 'demo.image') test
I get the following error: "Error: basicNew: failed" (see attached images at
the end).
When I tried to load VMMaker in the Pharo 1.3 OneClick release, I got
another error (see attached images at the end).
Am I doing something wrong?
Are those the right simulators to use? I can tell the difference between all
that are available in VMMaker package.
Thanks in advance!
Nick
http://forum.world.st/file/n3835723/error_while_trying_to_run_InterpreterSi…http://forum.world.st/file/n3835723/Error_while_loading_VMMaker_in_Pharo-1.…
--
View this message in context: http://forum.world.st/Got-Error-basicNew-failed-when-running-InterpreterSim…
Sent from the Smalltalk VM - Beginners mailing list archive at Nabble.com.