[Vm-dev] [CRAZY IDEA] "Breakpoints" in the VM from SLANG

Mariano Martinez Peck marianopeck at gmail.com
Sat Apr 16 22:29:21 UTC 2011


On Wed, Apr 13, 2011 at 2:48 AM, David T. Lewis <lewis at mail.msen.com> wrote:

>
> On Tue, Apr 12, 2011 at 05:50:56PM +0200, Mariano Martinez Peck wrote:
> >
> > On Tue, Apr 12, 2011 at 2:04 PM, David T. Lewis <lewis at mail.msen.com>
> wrote:
> >
> > >
> > > On Tue, Apr 12, 2011 at 01:40:22PM +0200, Mariano Martinez Peck wrote:
> > > >
> > > > So...I need to go to C, and "translate in my mind" what that part of
> > > SLANG
> > > > should look like in C, and search it in the C code. XCode is FAAAR to
> > > slow
> > > > to browe the interp.c . Morever, with inlined methods it is even more
> > > > difficult to find...
> > >
> > > XCode might be slow, but Squeak is fast :) Have a look at SlangBrowser
> > > for this. It has not been updated for either Pharo or oscog, but if
> > > anyone is interested maybe we can get that working too. Source is in
> > > the SqueakSource VMMaker project, and info at:
> > >
> > >  http://wiki.squeak.org/squeak/5916
> > >
> >
> >
> > Thanks Dave. I wasn't aware of what SlangBrowser was...I always saw it in
> > the VMMaker repo but I didn't know what it was until today. Cool project.
> I
> > really like the idea.
> > It would be awesome to extendt it so that it can not only supports
> > ObjectMemory/Interpreter/Plugins  but also CompiledMethods of those
> classes
> > :)
> >
> > For example,  (Interpreter >>#lookupInMethodCacheSel:class:)  asCString
> > that would be lovely :)
>
> Try this:
>
>  Transcript
>    open;
>    clear;
>    show: (Interpreter asCString: #lookupInMethodCacheSel:class:)
>


Thanks Dave. I tried but I only got this in the Transcript:

/* Simulator subclasses with method overrides should not be translated. */
/* ObjectMemory class>>initializeConstants */



>
> > Just for the record (if you want to include it in the wiki), in order to
> > make it work (the asCString) I needed to first load MemoryAccess because
> it
> > is used in VMMaker class >>cCodeGenerator: aClass inCache: cache inlined:
> > doInlining
> >
> > You can...or document that on the wiki or maybe add a Smalltalk at:   ?
> >
>
> Oops that's a bug, thanks.
>
> > Anyway, how much effort do you think it could be to adapt at least the
> > asCString to the new Cog versions ?    because this is a nice feature for
> > when you are learning
> >
>
> It should not be too hard. It's just a matter of creating the
> CCodeGenerator
> for any given class in the same way that VMMaker would have done, and using
> it to generate the code into strings that you can browse in the image
> and/or
> display in the browser code pane.
>
>
Let's do a deal, you adapt the asCString for Cog and I build a Glamour
browser for it :)



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110417/d14526c1/attachment-0001.htm


More information about the Vm-dev mailing list