<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div>
<div class="">Hi Folks,<br class="">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">
<div class="">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div class="">Do you have a moment to give me a hint on the following error?<br class="">
<div class=""><br class="">
I’m currently trying to get the result of the cogged version of SmallInteger>>#+ by simulating it in VMMaker. So I initialise the simulator, lookup the method in the loaded image and finally start Bochs by calling simulator activateCoggedNewMethod: false.<br class="">
<br class="">
Now I can see the primitiveSingleStepInMemoryMinimumAddressReadWrite failing when trying trying to return to esp=16r11 which is my receiver. So it seems my stack gets corrupted at some point. So I start tracing what the processor is doing:<br class="">
<br class="">
- starts at ceEnterCogCodePopReceiverReg (pc=16r1128)<br class="">
- then it enters the compiled SmallInteger>>#+ (pc= 16r1462, the position with HasByteCodePC)<br class="">
- then it enters ceSuperSend1Args (pc=16r570)<br class="">
- and runs further up to the return (at pc=16r5aa) where it will have the esp=16r11<br class="">
<br class="">
<div class="">Can you give me a hint on what’s happening here? I put the notes while tracing into a txt file that you can find attached. If you want to try it out yourself, I uploaded the image and the VM version here <a href="https://www.dropbox.com/sh/6sevutlcpx3of42/AAA9ScgmvK5IeLaCxE6yWJ8Ua?dl=0" class="">https://www.dropbox.com/sh/6sevutlcpx3of42/AAA9ScgmvK5IeLaCxE6yWJ8Ua?dl=0</a><br class="">
<div class=""><br class="">
</div>
<div class="">The Background: I’m currently working on my master thesis on Multi-Level Debugging where I’m building a debugger that is supposed to detect erroneous code transformations by redundantly executing the Slang, the running vm, the fallback code and
 also the JIT-compiled fallbacks.</div>
<div class=""><br class="">
</div>
<div class="">Thank you so much!</div>
<div class="">Basti</div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>