<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 21, 2017 at 7:28 AM, Phil B <span dir="ltr"><<a href="mailto:pbpublist@gmail.com" target="_blank">pbpublist@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br><div dir="auto"><div><span style="font-family:sans-serif">Clément,</span><br><div class="gmail_extra"><br><div class="gmail_quote">On Sep 20, 2017 7:04 PM, "Clément Bera" <<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail-m_4553397162935339388quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>In practice, all the people using the simulator have images that were built when Eliot's script was working, and we update the image with the new VMMaker code but don't rebuild them. I know its not good but we had to keep things working with limited ressources.</div><div></div></div></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Well that explains a whole lot right there.  I fairly regularly rebuild my images from scratch (too many bad experiences with image drift using deltas) and get concerned when I can't do so.  I guess I'll not worry about VMMaker for a while on that front if it's a known issue.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail-m_4553397162935339388quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>So there are 2 solutions:</div><div>- you ask someone with a working image to give it to you and you start from there (by loading the most recent code, etc.).</div><div>- you fix Eliot's script or you bug him until he fixes it.</div><div></div></div></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">I actually have a 5.0-based VMMaker image so I guess I'll try updating (ugh... 😀) it.  Since I'm only a casual viewer/user of these scripts, I'll defer to others who know how they want things to work to update it rather than potentially creating more work for them.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail-m_4553397162935339388quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div><br></div><div>I read quickly your report but it looks to me that 1 can be debugged through the simulator while 2,3,4 needs to be debugged with gdb. I am not sure with 3 since Eliot added some simulation support for sockets at some points.</div><div></div></div></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Thanks, I'll try as you suggest.</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail-m_4553397162935339388quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>For gdb with the VM the main things to know are:</div><div>- Debug VM is very slow, Assert VM is half the perf of prod VM for most things (though stack page switch for example is much slower in Assert VM).</div><div>- in general you want an assert or debug VM and put a breakpoint on warning, so when an assertion fails gdb stops and you can try to figure things out. </div><div>- you need to compile the debug VM to access C variables if you need so.<br></div><div>- you can call debug functions printStackAllStack, printFrame, printCogMethod, etc. in gdb. You can try to look in Slang in the VMMaker code for the list of debug functions available (<api> pragma). You often need to manually cast parameters to usqint / sqint in gdb to correctly call those functions.</div><div></div></div></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">This is a place I've been running into trouble: I've browsed the print* functions and have naively been trying to poke around but it's been a slog.  </div></div></blockquote><div><br></div><div>Maybe useful...</div><div><a href="http://forum.world.st/reversible-debugging-with-gdb-td4960462.html">http://forum.world.st/reversible-debugging-with-gdb-td4960462.html</a><br></div><div><br></div><div>cheers -ben</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="auto"><div dir="auto">Hopefully, the pointers you and the others have provided will help me get moving a bit faster.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail-m_4553397162935339388quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>As always for simulator or gdb the best is to save an image about to crash, start it on the debug platform and make it crash. </div><div><br></div><div>Good luck and have fun.</div><div></div></div></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Phil</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail-m_4553397162935339388quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></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="auto"><div dir="auto">Thanks,</div><div dir="auto">Phil</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail-m_4553397162935339388m_-2901090414015113713gmail-m_3177340391194962quote" 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 class="gmail_extra"><div class="gmail_quote"><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="auto"><div dir="auto"><div dir="auto"><br></div>Thanks,</div><div dir="auto">Phil<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Sep 18, 2017 7:38 PM, "tim Rowledge" <<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>> wrote:<br type="attribution"><blockquote class="gmail-m_4553397162935339388m_-2901090414015113713gmail-m_3177340391194962m_-5534209024655112212gmail-m_1617974822137480658quote" 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>
When possible you’re much better off using the VMSimulator to examine an image.<br>
<div class="gmail-m_4553397162935339388m_-2901090414015113713gmail-m_3177340391194962m_-5534209024655112212gmail-m_1617974822137480658quoted-text"><br>
> On 18-09-2017, at 4:25 PM, Phil B <<a href="mailto:pbpublist@gmail.com" target="_blank">pbpublist@gmail.com</a>> wrote:<br>
><br>
> Using gdb to explore a running image?  Blog post or video format is great.  Most of what I've run across is related to the internals of the VM rather than debugging an image.  My gdb skills are pretty rusty plus I suspect that not knowing all of the helper functions available in the VM (and how to best use them in a debugging workflow) is slowing me down.<br>
<br>
<br>
</div>tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
"Bother" said Pooh, as his rucksack opened whilst skydiving<br>
<br>
<br>
</blockquote></div><br></div></div></div>
<br></blockquote></div><br></div></div>
<br></blockquote></div><br></div></div></div>
<br></blockquote></div><br></div></div>
<br></blockquote></div><br></div></div></div>
<br></blockquote></div><br></div></div>