<br><br><div class="gmail_quote">On Tue, Apr 12, 2011 at 1:42 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">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>
well, you can use<br>
self flag: #abdede<br>
<br>
and then find this in source code and put break there.<br></blockquote><div><br>yes, true, that works :)<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><div></div><div class="h5"><br>
On 12 April 2011 13:40, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Probably not crazy but stupid or impossible to achieve...but anyway, I want to ask..<br>
&gt;<br>
&gt; Scenario: I find myself navigating the VMMaker code (SLANG) and I want to put a &quot;self halt&quot; somewhere there. Forget the simulator for the moment. So...I need to go to C, and &quot;translate in my mind&quot; what that part of SLANG should look like in C, and search it in the C code. XCode is FAAAR to slow to browe the interp.c . Morever, with inlined methods it is even more difficult to find...<br>

&gt;<br>
&gt; Anyway, I was thinking how cool could be to create breakpoints from VMMaker. I think it is not possible to put breakpoints in C code, but what about doing something like:<br>
&gt;<br>
&gt; Interpreter &gt;&gt; haltVM<br>
&gt; &quot;find a better name for this method&quot;<br>
&gt; self cCode: &#39;raise(SIGINT); &#39;<br>
&gt;<br>
&gt; Of course, we need to add a<br>
&gt; #include &lt;csignal&gt; // or signal.h if C code<br>
&gt;<br>
&gt; I have NO IDEA the implicance or side effects of doing this. I haven&#39;t tried either.<br>
&gt;<br>
&gt; And it is complicated to do it cross platform..etc. Here is a link to do more or less this idea:  <a href="http://stackoverflow.com/questions/4326414/set-breakpoint-in-c-or-c-code-programmatically-for-gdb-on-linux" target="_blank">http://stackoverflow.com/questions/4326414/set-breakpoint-in-c-or-c-code-programmatically-for-gdb-on-linux</a><br>

&gt;<br>
&gt; What I want is that if we are running with GDB and the VM calls haltVM()  then the GDB is paused so that I can do bt, etc...<br>
&gt;<br>
&gt; What do you think?<br>
&gt;<br>
&gt; --<br>
&gt; Mariano<br>
&gt; <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>