[Vm-dev] debuggable win32 VM?

Igor Stasenko siguctua at gmail.com
Wed May 11 13:25:15 UTC 2011

On 11 May 2011 14:59, Craig Latta <craig at netjam.org> wrote:
> Hi--
>     For the next Spoon release I want debuggable VMs and plugins on all
> platforms. In 2007 for win32 I created a Microsoft Visual C "solution"
> for use with the free MSVC Express Edition (2008 or later). The debugger
> is decent.
>     I scanned the current CMake-based stuff, but didn't see anything
> about MSVC (or win32 gdb for that matter). Is there a current route for
> debugging the win32 VM using MSVC or gdb (or anything more pleasant than
> printf)? Or should I update my MSVC stuff and contribute it somewhere?
> In 2007 I only gave it to Andreas (the win32 VM maintainer) and a few
> other folks who asked for it.
It was always a pain for me to debug windoze Vms.
The only option to debug VMs built using GCC on windows is gdb.
And for me is quite awkward to use debugger from console, and it
wasn't worked well
on windows (i tried different versions of gdb).
Some cannot even print correct stack frames, not saying about the rest.
MSVC debugger is superior in all regards.

For building VMs using other compiler: as you may know for GCC we're
using gnuification step
which converts a huge case statement in interpret() function into jump
table, which significantly
improves the speed (about 30%). So if you use other compiler you will
automatically lose this advantage
unless it also supports dispatch based on jump tables.
But of course for debugging, you don't have to care about speed.
I cannot say about Squeak VM, but for Cog & cmake today it could be
quite simple to create a configuration
and adopt it for MSVC.
Cmake can generate solution and project files, so you don't need to do
it manually,
and then you just open it in MSVC and build your project using it,
and then of course you can use MSVC debugger.

However i didn't tried it, but i tried to build Cog using clang
compiler (which is available on macs) and it works well
(i just created another class - StackCocoaIOSCLANGConfig, and then
built vm as usual, using cmake).

So, same could be done for MSVC, but of course someone has to do it. :)

>     thanks!
> -C
> --
> Craig Latta
> www.netjam.org/resume
> +31  06 2757 7177
> + 1 415  287 3547

Best regards,
Igor Stasenko AKA sig.

More information about the Vm-dev mailing list