[Vm-dev] Shape/ABI of code jitted by cog?
eliot.miranda at gmail.com
Wed Feb 14 18:26:26 UTC 2018
On Wed, Feb 14, 2018 at 6:32 AM, Javier Pimás <elpochodelagente at gmail.com>
> For debugging aid, I'd like to know if there is any cheatsheet with things
> like frame layout in the native stack (offset of the compiled method, the
> receiver, temporaries) and shape of the code (i.e. how to detect where a
> method starts and ends).
The first choice is how you're going to debug. You can debug the generated
C code. There are several printing and debug functions included in the
generated source, and it is set up to be compiled in three variants,
production, assert and debug. See any of the HowToBuild files under the
build directories. But debugging at the C level is much more difficult and
less productive than using the development environment, "the simulator".
The VM is best understood, developed and debugged in Smalltalk. You can
create a VMMaker image containing the full environment using the
image/buildspurtrunkvmmakerimage.sh scripts (32-bit or 64-bit, 64-bit
is faster for 64-bit development). A workspace in the image (the contents
of image/VM Simulation Workspace.text) contains launch expressions for the
simulator. The simulator has three windows, the top for the Smalltalk
display, the bottom left for a transcript, and the bottom right for
commands. The bottom right pane has a menu with an extensive set of debug
One useful thing is to browse all methods beginning with print local to
VMMaker, especially those in the Cogit hierarchy (the JIT), the
StackInterpreter hierarchy (the Interpreter) and the SpurMemoryManager
hierarchy (the memory manager/GC).
Perhaps you could tell us a little bit about what you're trying to do and
we can try and provide some more specific information.
> Javier Pimás
> Ciudad de Buenos Aires
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev