<div dir="ltr">I've been debugging squeaknos running (crashing) inside a system vm. I think the simulator cannot be used in this case so I guess my next best choice <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">will be </span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">a gdb debug stub</span>.<div><br></div><div>Cheers!</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 14, 2018 at 3:26 PM, Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">Hi Javier,<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 14, 2018 at 6:32 AM, Javier Pimás <span dir="ltr"><<a href="mailto:elpochodelagente@gmail.com" target="_blank">elpochodelagente@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">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). </div></blockquote><div><br></div><div>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".</div><div><br></div><div>The VM is best understood, developed and debugged in Smalltalk.  You can create a VMMaker image containing the full environment using the image/buildspurtrunkvmmaker[64<wbr>]image.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 commands.</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Cheers,<br></div><div>Pocho<br clear="all"><div><br></div>-- <br><div class="m_-8291278337207178982m_1686983336665660573gmail-m_-8385752085661601495gmail_signature"><div dir="ltr">Javier Pimás<br>Ciudad de Buenos Aires</div></div></div></div></blockquote></div><br><div class="m_-8291278337207178982m_1686983336665660573gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-8291278337207178982gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Javier Pimás<br>Ciudad de Buenos Aires</div></div>
</div></div>