Archive for debugging

VM debugging trick: browsing object memory snapshots made from the C debugger in the simulator

Posted in Smalltalk, Spoon with tags , , , , , , on 17 December 2013 by Craig Latta

Recently I made use of a virtual machine debugging trick that I don’t think I’ve written about here. The virtual machine simulator is a great way to browse around the state of object memory at the point of a VM crash, but it’s relatively slow (I measured it at about 3,000 instructions per second in my sonification¬†work). The time it takes to get to that point might be prohibitively long.

Instead, you can run to that point in the C debugger (I use lldb on Mac OS), and make a snapshot by invoking primitiveSnapshot() manually. Then, open a simulator on that snapshot and browse the objects to your heart’s content. Depending on the error, you might even be able to modify the objects such that the active process may proceed, and you can snapshot a repaired object memory from the simulator.


toward a virtual machine browser

Posted in Naiad, Smalltalk, Spoon with tags , , on 27 November 2013 by Craig Latta

I just had an idea for the design of a “virtual machine browser”, for browsing the internal state of a running virtual machine simulator and the objects of the memory it’s running. Something more sophisticated than printing the debug support messages to the Transcript.

%d bloggers like this: