How long is your project and how many people are you? For me, what you are trying to do is a certain job. Do you have a good knowledge of low-level behavior?
To answer your question, the main problem here is that the cog simulator is not supported in the pharo vm plug. This is because no one in the team of farons uses a simulator. We use only external debugging from gdb. In fact, pharo people work mainly on VM plugins, the VM core is mainly supported and developed by Eliot Miranda, who works on Squeak. Therefore, we inform him when there is an error in the VM core.
For your project, you will have to break it down into at least 2 steps:
step 1: get the object table to work with the VM stack
step 2: do the jit work with your object table
Please note that for step 2, I would recommend not changing the way of accessing its title, so it has a table of objects similar to VW, where you have a fixed size header on what is in the table of objects, and the fields are objects (and, possibly, header extensions) on the heap.
So, use StackVMSimulator and first create StackVM. When everything works (including context), you might consider hacking JIT. Guillermo Polito recently ported the Stack virtual machine to the build process (see PharoSVMBuilder instead of PharoVMBuilder), the guy reported problems with this builder, but you could hack it a bit to make it work.
Now, to make the simulator run on Pharo 2.0 (this is the version of the Pharo generator image you have), you need to open the monticello browser and merge the Cog package (repo MCHttpRepository: http: // source. Squeak. Org / VMMaker ') from the Eliot branch, but not the last Cog, one that is about the same day as the current VMMaker pharo-vm package, because the latest Cog and VMMaker from the Eliot branch are unstable.
An alternative is to get started with creating an Eliot image and merging things from the pharo branch. Here is information on how to create a squeak development image ( http://www.mirandabanda.org/cogblog/build-image/ ).
Then Eliot gave me this script once:
| cos | cos := CogVMSimulator newWithOptions:
You do not need the SistaStackToRegisterMappingCogit parameter. I think some similar script with StackVMSimulator should work.
Finally, there are some documents about the simulator, but this is only for CogSimulator (in these documents you already know how StackSimulator works, and just give you tips on how to use it with JIT): http://www.mirandabanda.org/ cogblog / 2008/12/12 / simulate-out-of-the-bochs / and in one of the videos called "Cog VM (part x)", x is 1 to 6, Eliot shows how he uses the simulator to unmount x86, prints the stack and checks the heap.
One more question, ask your questions on the pharo mailing list (pharo or pharo dev users), because no one here can notice your question (fortunately, someone pointed me your question this time).
And tell me on the pharo mailing list, if you managed to run the simulator in Pharo 2.0, some people (like me) are very interested in it. I planned to do this at some point.
Good luck Good project anyway.