[Vm-beginners] Re: Fwd: Oops - I put a halt in a startup method

Mariano Martinez Peck marianopeck at gmail.com
Mon Dec 5 23:37:42 UTC 2011


You are lucky that since your problem is in the startup list, then the
CompiledMethod was not yet converted to machine code. Because if it was,
then the method execution does NOT go by #commonSend: but rather from a
different place. So be careful that that way you are NOT intercepting all
times such method is executed :)

On Mon, Dec 5, 2011 at 9:37 PM, Luc Fabresse <luc.fabresse at gmail.com> wrote:

> Really nice!
> Thanks Sean.
>
> #Luc
>
>
> 2011/12/5 Sean P. DeNigris <sean at clipperadams.com>
>
> The full procedure I followed was:
>> 1. Download (from Jenkins):
>>  a. the cog source code from Jenkins
>>
>> https://ci.lille.inria.fr/pharo/view/Cog/job/Cog%20Git%20Tracker%20(blessed)/lastSuccessfulBuild/artifact/cog.tar.gz<https://ci.lille.inria.fr/pharo/view/Cog/job/Cog%20Git%20Tracker%20%28blessed%29/lastSuccessfulBuild/artifact/cog.tar.gz>
>>  b. the vmmaker image
>>
>> https://ci.lille.inria.fr/pharo/view/Cog/job/Cog%20Git%20Tracker%20(blessed)/lastSuccessfulBuild/artifact/vmmaker-image.zip<https://ci.lille.inria.fr/pharo/view/Cog/job/Cog%20Git%20Tracker%20%28blessed%29/lastSuccessfulBuild/artifact/vmmaker-image.zip>
>> 2. Setup folders
>>  a. Unzip cog
>>  b. Extract the vmmaker image files (image, changes, source) to cog/image
>> 3. Create (Smalltalk part of) hook to skip selector -
>> CoInterpreter>>commonSend should look like
>> https://gist.github.com/1434823
>> 4. Generate (Slang and CMake configuration info)
>>  In the vmmaker image, doIt:
>>        CogCocoaIOSConfig new "Cocoa Jit"
>>                addExternalPlugins: #( FT2Plugin );
>>                generateForDebug; "will be a debug build"
>>                generateSources; "Slang -> C"
>>                generate. "CMake configuration"
>> 4. Configure (in this case for Xcode)
>>  a. From command line, "cd cog/build; cmake -G Xcode"
>>  b. For Lion: In Xcode, choose gcc as project compiler (project will be in
>> pwd when you did the CMake i.e. cog/build)
>>
>> http://forum.world.st/file/n4161823/Screen_Shot_2011-12-05_at_1.52.24_PM.png
>> 5. Create (C part of) hook to skip selector
>>  a. In Xcode, do a text search for "skipMe", which you'll find in
>> gcc3x-cointerp.c
>>  b. Replace the first branch of the boilerplate conditional to look like
>> https://gist.github.com/1434683 (replace selectorToSkip with your
>> selector)
>> 6. Build & Run
>>  a. Select CogVM from the "Scheme" dropdown
>>  b. Click the "Run" button
>>
>> Your image should run normally (but slowly), skipping the requested
>> selector. You can even put in some breakpoints and play.
>>
>> --
>> View this message in context:
>> http://forum.world.st/Fwd-Oops-I-put-a-halt-in-a-startup-method-tp3800729p4161823.html
>> Sent from the Smalltalk VM - Beginners mailing list archive at Nabble.com.
>> _______________________________________________
>> VM-beginners mailing list
>> VM-beginners at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners
>>
>
>
> _______________________________________________
> VM-beginners mailing list
> VM-beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-beginners/attachments/20111206/7a86617d/attachment.htm


More information about the VM-beginners mailing list