[squeak-dev] Re: How to get a list of all plugins in VM (Andreas Raab)

Maarten Maartensz maartens at xs4all.nl
Tue Mar 24 10:44:44 UTC 2009


Hello Andreas,

Long time, no see but I still follow Squeak and my Squeak Help on my site. See

http://www.maartensz.org/computing/computingFrame.htm

which I wrote for Squeak 3.7 is still used daily on my site by quite a few
visitors, so apparently it still satisfies a need.

My main reason to keep following Squeak is interest (it looks a lot better now
than a few years ago) in HLL, Smalltalk and Morphic, but my own main interest in
computing and programming these days is mostly in assembly.

And this caused my answering this thread, though it doesn't answer Ross Boylan's
question for Linux, which I don't run.

You wrote, in reply to him:

> Ross Boylan wrote:
> > I'm trying to figure out if I'm setup so I can use some of the font
> > packages.  I'm running a 3.10 image (but 3.9 VM) on Linux (Debian
> > Lenny).
> >
> > How do I get a list of all plugins?
>
> You don't. External, unloaded plugins can't be enumerated since they are
> just platform shared libraries (DLLs). They could be found anywhere in
> your search path which makes it very difficult to list them explicitly.

On Windows, though, there are nifty great and small assembly-related programs
that answer many queries, also about what is really there in Squeak.exe, all
laid out neatly.

A great one for this (also in size and capacities) is OllyDbg, by Oleg Yushuck;
a small one (idem) is PEView by Wayne Radburn. Both are at various places on the
internet, and easily found with Google.

The last one is most convenient here. The one I used  is 0.9.8.0 that takes -
unzipped - all of 67 Kb (it's programmed in assembly, you see, and there is no
image at all...) which neatly shows in its SECTION.edata (e.g. EXPORT Address
Table) which primitives are in the executable. Likewise, its SECTION.idata
displays the loaded DLLs.

To find this and much more, all one needs is PEView and opening Squeak.exe in
it, which then lists it quite neatly. If one knows some C or Assembly this is
all
quite revealing and interesting, and one item to be found thus at various places
is e.g. "Andreas Raab", at least in the version of Squeak.exe I inspected this
way.

In any case... some questions about Squeak.exe can definitely be answered quite
easily and fastly on Windows using PEView.

Regards,

Maarten.


>   13.  Re: How to get a list of all plugins in VM (Andreas Raab)
> Message: 13
> Date: Mon, 23 Mar 2009 15:55:29 -0700
> From: Andreas Raab <andreas.raab at gmx.de>
> Subject: [squeak-dev] Re: How to get a list of all plugins in VM
> To: The general-purpose Squeak developers list
> <squeak-dev at lists.squeakfoundation.org>
> Cc: ross at biostat.ucsf.edu
> Message-ID: <49C81361.7040308 at gmx.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Ross Boylan wrote:
> > I'm trying to figure out if I'm setup so I can use some of the font
> > packages.  I'm running a 3.10 image (but 3.9 VM) on Linux (Debian
> > Lenny).
> >
> > How do I get a list of all plugins?
>
> You don't. External, unloaded plugins can't be enumerated since they are
> just platform shared libraries (DLLs). They could be found anywhere in
> your search path which makes it very difficult to list them explicitly.
>
> The right way to solve your problem is to provide an entry point in your
> plugin that can be used to detect whether the plugin is available. A
> useful thing to do here is to provide a primitiveVersion because later
> on you'll be able to use that to detect whether the user has an outdated
> plugin version. Then you can simply implement something like:
>
> MyClass>>pluginVersion
> "Returns the plugin version, or nil if the plugin cannot be loaded"
> <primitive: 'primitiveVersion' module: 'MyPlugin'>
> ^nil "indicates failure"
>
> MyClass>>isPluginPresent
> "Returns true if the plugin is present"
> ^self pluginVersion notNil
>
> MyClass>>isPluginOfTheRightVersion
> "Returns true if the plugin is of the right version"
> ^(self pluginVersion ifNil:[0]) > self minimumVersion
>
> Cheers,
>    - Andreas
>
>
> ------------------------------





More information about the Squeak-dev mailing list