[Vm-dev] Mac and iOS VMs - how to debug?

John McIntosh johnmci at smalltalkconsulting.com
Thu Aug 17 02:38:10 UTC 2017

Hi, yes I am currently building the pharo/squeak vm using
the spurstack64src  or spurstack32src VM source via a custom made xCode
project, as I have some 2009 era apps in the store that need 64 bit support
for iOS 11.

(a) my spurstack64 bit vm runs faster that the production VM due to some
changes to how jumpTable is defined and some care & attention to variables
in the foo structure.

(b) This xCode project will build 32/32  64/64 cog stack spur vm, or cog
stack 32/32 64/32 64/64 vm. Changes within Spur prevent the ability to
build a 64/32 variation

(c) This Xcode project was created mainly as a way to deploy iOS apps, not
as a replacement for the existing cmd-line build process, the fact it has a
build for MacOS is to assist in testing headless iOS apps on Mac OS.

(d) I have tested it (i.e. smoke tested) with Squeak, Pharo and Cuis
images. Oh and built with Pods & swift  for another project on the go.

Lastly I am exploring how to merge the changes back into a possible
JMM/iPhone64 branch for review and later merge into the iOS platform tree.

On Wed, Aug 16, 2017 at 3:53 PM, Eliot Miranda <eliot.miranda at gmail.com>

> Hi Todd,
> On Wed, Aug 16, 2017 at 11:25 AM, Todd Blanchard <tblanchard at mac.com>
> wrote:
>> Hi,
>> I'm interested in 1) learning more about how the VM interfaces with the
>> Mac OS.  Usually to get a feel for this sort of thing I'd build the thing
>> in Xcode, run it in the debugger, set some breakpoints, and observe the
>> stack traces.  Since the VM is built using command line tools, what's a
>> good way to get the VM under a debugger so I can observe it running?  I'm
>> more interested in the platform specific bits rather than the portable
>> parts.
> Building with Xcode is not supported because Xcode offers no
> parameterization of their project definitions and hence maintaining several
> project files is not feasible.  We use the clang compiler and the lldb
> debugger.  Simply build the VM of choice as described by
> {build.macos32x86,build.macos64x64}/HowToBuild using the relevant mvm
> script (e.g.  build.macos64x64/squeak.cog.spur/mvm) and debug either the
> assert or the debug VM via lldb.  You can debug the production VM but its
> debuggability is limited.
>> 2) Is there an iOS VM?  I cloned the git repo and see build directories
>> for a number of platforms.  I don't see anything other than desktops.  No
>> raspberry pi, no iOS etc... I do find some references to these in the
>> platforms directory but I don't quite understand how it all fits together.
> By iOS do you mean iOS on iPhone?  If so, contact John McIntosh.  He is
> actively developing VMs for iOS.  There maybe others too.  If by iOS you
> mean using the Cocoa interface instead of the Carbon interface, then all
> the standard Mac OS builds are now Cocoa builds.
>> Thanks for any pointers.
>> -Todd Blanchard
> --
> _,,,^..^,,,_
> best, Eliot

John M. McIntosh. Corporate Smalltalk Consulting Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170816/f511b541/attachment-0001.html>

More information about the Vm-dev mailing list