<br><br><div class="gmail_quote">On Fri, Sep 28, 2012 at 5:55 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Hi,<br>
<br>
if i build a debug version of VM on windows , it spams me with this<br>
assertion failed in debug console window:<br>
<br>
(getfp() &amp; STACK_ALIGN_MASK) == STACK_FP_ALIGN_BYTES 41946<br>
....<br>
<br>
what is this number &#39;41946&#39;, which follows? sometimes it is 42015 (and<br>
sometimes other), but most of times it&#39;s 41946.<br>
<br>
Actual question, how i can instruct gdb to break on a first failure of<br>
this assertion, so i can catch who causing this (or at least get close<br>
to one who causing it)..<br></blockquote><div><br></div><div>I am copy pasting from an old thread. Notice the yellow part:</div><div><br></div><i><span style="background-color:rgb(255,255,0)">(gdb) break warning</span><br>
Breakpoint 1 at 0x105e2b: file /Users/eliot/Cog/oscogvm/macbuild/../src/vm/gcc3x-cointerp.c, line 39.<br>
<span style="background-color:rgb(255,255,0)">(gdb) run -breaksel initialize ~/Squeak/Squeak4.2/trunk4.2.image</span><br>Starting program: /Users/eliot/Cog/oscogvm/macbuild/Debug.app/Contents/MacOS/Croquet -breaksel initialize ~/Squeak/Squeak4.2/trunk4.2.image<br>

Reading symbols for shared libraries .+++++++++++++++..................................................................................... done<br>Reading symbols for shared libraries . done<br><br>Breakpoint 1, warning (s=0x16487c &quot;send breakpoint (heartbeat suppressed)&quot;) at /Users/eliot/Cog/oscogvm/macbuild/../src/vm/gcc3x-cointerp.c:39<br>

39              printf(&quot;\n%s\n&quot;, s);<br>(gdb) where 5<br>#0  warning (s=0x16487c &quot;send breakpoint (heartbeat suppressed)&quot;) at /Users/eliot/Cog/oscogvm/macbuild/../src/vm/gcc3x-cointerp.c:39<br>#1  0x0010b490 in interpret () at /Users/eliot/Cog/oscogvm/macbuild/../src/vm/gcc3x-cointerp.c:4747<br>

#2  0x0011d521 in enterSmalltalkExecutiveImplementation () at /Users/eliot/Cog/oscogvm/macbuild/../src/vm/gcc3x-cointerp.c:14103<br>#3  0x00124bc7 in initStackPagesAndInterpret () at /Users/eliot/Cog/oscogvm/macbuild/../src/vm/gcc3x-cointerp.c:17731<br>

#4  0x00105ec9 in interpret () at /Users/eliot/Cog/oscogvm/macbuild/../src/vm/gcc3x-cointerp.c:1933<br>(More stack frames follow...)</i><br><div><br></div><div>So that will halt whenever #intiialize is sent. However, if you do not put that, I THINK that the assert also calls warning() so it should also halt.</div>

<div><br></div><div>Here is what I understood when Eliot told me about that:</div><div><br></div><div><i><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">So, if I understood correctly, I can put a </span><span class="il" style="background-color:rgb(255,255,204);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px">breakpoint</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)"> in the function warning() with &quot;</span><span class="il" style="background-color:rgb(255,255,204);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px">break</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)"> warning&quot;. With the -breaksel  parameter you set an instVar with the selector name and size. Then after, anywhere I can send  #compilationBreak: selectorOop </span><span class="il" style="background-color:rgb(255,255,204);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px">point</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">: selectorLength   and that will magically check whether the selectorOop is the one I passes with -breaksel and if true, it will call warning, who has a </span><span class="il" style="background-color:rgb(255,255,204);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px">breakpoint</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">, hence, I can debug :)   AWESOME!!!!   Now with CMake I can even generate a xcode project and debug it :)  (I don&#39;t know why attaching gdb from Xcode crash the vm).</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">
</i></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
<br>
P.S. the STACK_ALIGN_BYTES  is 16<br>
<br>
P.P.S. i wonder for how long this thing broken there, since we&#39;re not<br>
building/using debug version of VM that often.<br>
<span><font color="#888888"><br>
--<br>
Best regards,<br>
Igor Stasenko.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>