<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 12, 2017 at 12:56 PM, David T. Lewis <span dir="ltr"><<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Wed, Jan 11, 2017 at 09:03:53PM -0500, David T. Lewis wrote:<br>
> On Wed, Jan 11, 2017 at 05:10:24PM +0100, Bert Freudenberg wrote:<br>> ><br>
> > Some early images fill the context stack before advancing its stack<br>
> > pointer. I have a flag to allow that, it's pretty certainly used in<br>
> > primitive 61.<br>
><br>
> Brilliant, thanks Bert.<br>
><br>
> I see several places where we check "fmt = 3 and: [self isContextHeader: hdr]",<br>
> including in #stObject:at:put: which is probably the immediate cause of the<br>
> failure that I was seeing. And #stSizeOf: does this:<br>
><br>
>       (fmt = 3 and: [self isContextHeader: hdr])<br>
>               ifTrue: [stSize := self fetchStackPointerOf: array]<br>
>               ifFalse: [stSize := totalLength - fixedFields].<br>
><br>
> I'll try playing with it this weekend and see if I can get it working for the<br>
> older images.<br>
><br>
> But I have to ask ... how in the world did you figure this out?<br></div></div></blockquote><div><br></div><div><span style="font-size:12.8px">Well, debugging the startup code is actually quite comfortable using my VM debugger (</span><a href="https://lively-web.org/users/bert/squeak.html" target="_blank" style="font-size:12.8px">https://lively-web.org/users/<wbr>bert/squeak.html</a><span style="font-size:12.8px">). </span>It shows the call stack, current frame, and byte code, and lets you set a break point, and single-step through the code. Someone should make a similar UI for the Squeak VM Simulator :)<br></div><span class="gmail-im"><div style="font-size:12.8px"><br></div><blockquote class="gmail_quote" style="font-size:12.8px;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-m_-7747547428004377760gmail-HOEnZb"></div></blockquote></span><div>So what I did is pause the VM when the startup didn't finish, look up the call stack to see where things went wrong, set a break point for that method, run again, and then single-step to where it goes wrong.</div><div><br></div><div>At least I think that's what I did, because right now I can't get it to malfunction even when I disable the flag ... where exactly did it break for you?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">
> :-)<br>
><br>
<br>
</div></div>Indeed, disabling the stack pointer check in #stObject:at:put: results in<br>
a VM that now works with the old Squeak1.13u.image</blockquote><div><br></div><div><span style="font-size:12.8px">Yay! :)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><div>- Bert -</div></span></div></div><br></div></div>