<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Well since my wife and eldest son are wrestling with a dead turkey I'm hiding in the study casually checking email.&nbsp;<div><br></div><div>This would be because GIV is a macro/definition/etc &nbsp;</div><div>Its to decide to generate either&nbsp;foo-&gt;interpreterInstVar &nbsp;or just&nbsp;interpreterInstVar</div><div><br></div><div>The use of&nbsp;SQ_USE_GLOBAL_STRUCT and declaring foo static or not has serious performance implications all&nbsp;</div><div>twisted by the type of CPU and which compiler and which version of the compiler. &nbsp;Only trying lots of combinations for&nbsp;</div><div>your particular setup of the day (not in the past, or in the future) would say which is best. Update your compiler? All bets are off.</div><div><br></div><div>So in this case it's not a function call otherwise you could say call (int) printAllStacks() in gnu debug, which can be very useful.</div><div><br></div><div><br></div><div>#if SQ_USE_GLOBAL_STRUCT</div><div>&nbsp;} fum;</div><div># define DECL_MAYBE_SQ_GLOBAL_STRUCT register struct foo * foo = &amp;fum;</div><div># define DECL_MAYBE_VOLATILE_SQ_GLOBAL_STRUCT volatile register struct foo * foo = &amp;fum;</div><div># define GIV(interpreterInstVar) (foo-&gt;interpreterInstVar)</div><div>#else</div><div># define DECL_MAYBE_SQ_GLOBAL_STRUCT /* oh, no mr bill! */</div><div># define DECL_MAYBE_VOLATILE_SQ_GLOBAL_STRUCT /* oh no, mr bill! */</div><div># define GIV(interpreterInstVar) interpreterInstVar</div><div>#endif</div><div><br></div><div><br></div><div>&nbsp;<br><div><div>On 2010-12-25, at 10:53 AM, Mariano Martinez Peck wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi guys. While debugging the VM with XCode, I sometime feel really stupid.&nbsp; Uhhh, sorry, happy Christmats ;)<br>I cannot inspect values or do things. Maybe I am so used to Smalltalk that I am asking too much to C. <br><br>
So, for example I have this code:<br><br>&nbsp;&nbsp;&nbsp; if (! ( (&nbsp; (usqInt) addr&nbsp; ) &lt;=&nbsp; (&nbsp;&nbsp; (usqInt) GIV(fwdTableNext) )&nbsp;&nbsp; ))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; print("fwdTableNext");<br>&nbsp;&nbsp;&nbsp; };<br><br><br>And I have a breakpoint on the print. I can see the value of fwdTableNext&nbsp; or addr. But how can I inspect for example, "GIV(fwdTableNext)" ?&nbsp; or "(&nbsp;&nbsp; (usqInt) GIV(fwdTableNext) )" ?<br>
I mean...how can I inspect the result of calling certain functions to such variables?&nbsp; can I do that?&nbsp; if I cannot, how it is expected I can debug that for example?&nbsp; (assing each result to another variable ans inspect that?)<br>
<br>I tried using the the expressions browser, but everything I add says "out of scope"<br><br>Thanks in advance,<br><br>Mariano<br>
_______________________________________________<br>VM-beginners mailing list<br><a href="mailto:VM-beginners@lists.squeakfoundation.org">VM-beginners@lists.squeakfoundation.org</a><br>http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners<br></blockquote></div><br><div>
<span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">--</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">===========================================================================</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">John M. McIntosh &lt;<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>&gt; &nbsp; Twitter: &nbsp;squeaker68882</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Corporate Smalltalk Consulting Ltd.&nbsp;&nbsp;<a href="http://www.smalltalkconsulting.com">http://www.smalltalkconsulting.com</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">===========================================================================</font></div><div><br></div></div></div></div></div></div></span></div></span><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></div></body></html>