Hello all,<br><br>Thought will share this to the list :-)<br><br>Note: The blog was written based on LDTPv1<br><br><div class="articalTitle"> 
                                        
                        <h2 id="t_5fd6e7ac0100lxmi" class="titName SG_txta">Debugging&nbsp;ldtp&nbsp;over&nbsp;net&nbsp;from&nbsp;2&nbsp;PCs&nbsp;(XP&nbsp;&amp;&nbsp;Ubuntu)</h2>
                        
                                        <span class="img2">
                                <img title="此博文包含图片" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" class="SG_icon SG_icon18" width="15" height="15" align="absmiddle">        
                        </span>
                                        <span class="time SG_txtc">(2010-09-28 18:44:44)</span><div class="turnBoxzz"><a id="quote_set_sign2" class="SG_aBtn SG_aBtn_ico SG_turn"><cite><img class="SG_icon SG_icon111" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" width="15" height="15" align="absmiddle">转载</cite></a></div>

                </div>
                <div class="articalTag" id="sina_keyword_ad_area">
                        <table>
                                <tbody><tr>
                                        <td class="blog_tag">
                                        
                                                                                        <span class="SG_txtb">标签:</span>
                                                                                                                                                                <h3><a href="http://uni.sina.com.cn/c.php?t=blog&amp;k=%D4%D3%CC%B8&amp;ts=bpost&amp;stype=tag" target="_blank">杂谈</a></h3>
                                                                                                                                </td>
                                        <td class="blog_class">
                                                                                        <span class="SG_txtb">分类:</span>
                                                <a target="_blank" href="http://blog.sina.com.cn/s/articlelist_1607919532_3_1.html">ldtp</a>
                                                                                </td>
                                </tr>
                        </tbody></table>
                </div>
                                                
                <div id="sina_keyword_ad_area2" class="articalContent">
                        <p>The working PC I&#39;m using usually is under Windows Box, and the
device (arm target that running ldtp) is connected to this pc over
USB. However, ldtp source code is compiled under
Ubuntu(scratchbox), and I could not find a porting gdb which
is&nbsp;working under Windows(I tired to use cygwin
gdb, but failed to communicate device). I had to transfer to
Ubuntu, that&#39;s not good.</p>
<p>&nbsp;</p>
<p>One reason is that I don&#39;t like the fonts Linux offered, I never
get a stylish font in gedit.</p>
<p>And I have set an X11 forward feature from putty so that
I&nbsp;can control the simulator (x86
target)&nbsp;under Window XP, pretty much pro<img src="http://www.sinaimg.cn/uc/myshow/blog/misc/gif/E___6725EN00SIGG.gif" type="face" alt="Debugging&nbsp;&lt;wbr&gt;ldtp&nbsp;&lt;wbr&gt;over&nbsp;&lt;wbr&gt;net&nbsp;&lt;wbr&gt;from&nbsp;&lt;wbr&gt;2&nbsp;&lt;wbr&gt;PCs&nbsp;&lt;wbr&gt;(XP&nbsp;&lt;wbr&gt;&amp;&nbsp;&lt;wbr&gt;Ubuntu)" title="Debugging&nbsp;&lt;wbr&gt;ldtp&nbsp;&lt;wbr&gt;over&nbsp;&lt;wbr&gt;net&nbsp;&lt;wbr&gt;from&nbsp;&lt;wbr&gt;2&nbsp;&lt;wbr&gt;PCs&nbsp;&lt;wbr&gt;(XP&nbsp;&lt;wbr&gt;&amp;&nbsp;&lt;wbr&gt;Ubuntu)">.</p>


<p>&nbsp;</p>
<p>Lucky, I have find a way to debug it under XP today, that&#39;s why
I write to here, hope it will help other if they never tried this,
see picture below for my target:</p>
<p><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5fd6e7ac0100lxmi&amp;url=http://static6.photo.sina.com.cn/orignal/5fd6e7acn914ffc30e645" target="_blank"><img title="" src="http://static6.photo.sina.com.cn/bmiddle/5fd6e7acn914ffc30e645&amp;690" alt="Debugging&nbsp;&lt;wbr&gt;ldtp&nbsp;&lt;wbr&gt;over&nbsp;&lt;wbr&gt;net&nbsp;&lt;wbr&gt;from&nbsp;&lt;wbr&gt;2&nbsp;&lt;wbr&gt;PCs&nbsp;&lt;wbr&gt;(XP&nbsp;&lt;wbr&gt;&amp;&nbsp;&lt;wbr&gt;Ubuntu)"></a><br>



<br>
Both XP and Uubunut is running a port [ <strong><font color="#ed1c24">2345</font></strong> ]forward server, rinetd, the config
should be like this:</p>
<p>Window XP, forward the data to my device:</p>
<p><font color="#4d6df3">#
bindadress&nbsp;&nbsp;&nbsp;
bindport&nbsp; connectaddress&nbsp;
connectport<br>
0.0.0.0 2345 172.22.3.1 2345</font></p>
<p>Ubuntu, forward the data to remote server:</p>
<p><font color="#22b14c">#
bindadress&nbsp;&nbsp;&nbsp;
bindport&nbsp; connectaddress&nbsp;
connectport<br>
0.0.0.0 2345 192.168.3.1 2345</font></p>
<p>&nbsp;</p>
<p>Yes, I have SSH server on Ubuntu, so that I can control from
XP(for X86 as well).</p>
<p>So, after login into device, I issue to create a gdbserver
listener:</p>
<p><font color="#22b14c">/var/opt/home # gdbserver :2345
/usr/bin/ldtp -s<br>
Process /usr/bin/ldtp created; pid = 1345<br>
Listening on port 2345</font><br></p>
<p>Then&nbsp;connect by to that port:</p>
<p><font color="#22b14c">$:)gdb /usr/local/bin/ldtp</font></p>
<p><font color="#22b14c">No symbol table is
loaded.&nbsp; Use the &quot;file&quot; command.<br>
(gdb) target remote <a href="http://127.0.0.1:2345">127.0.0.1:2345</a><br>
Remote debugging using <a href="http://127.0.0.1:2345">127.0.0.1:2345</a><br>
[New Thread 1345]<br>
0x410007d0 in ?? ()<br>
(gdb) b main<br>
Breakpoint 1 at 0xcda8: file ldtp.c, line 473.</font></p>
<p>&nbsp;</p>
<p>That&#39;s done, Good enough<img src="http://www.sinaimg.cn/uc/myshow/blog/misc/gif/E___6725EN00SIGG.gif" type="face" alt="Debugging&nbsp;&lt;wbr&gt;ldtp&nbsp;&lt;wbr&gt;over&nbsp;&lt;wbr&gt;net&nbsp;&lt;wbr&gt;from&nbsp;&lt;wbr&gt;2&nbsp;&lt;wbr&gt;PCs&nbsp;&lt;wbr&gt;(XP&nbsp;&lt;wbr&gt;&amp;&nbsp;&lt;wbr&gt;Ubuntu)" title="Debugging&nbsp;&lt;wbr&gt;ldtp&nbsp;&lt;wbr&gt;over&nbsp;&lt;wbr&gt;net&nbsp;&lt;wbr&gt;from&nbsp;&lt;wbr&gt;2&nbsp;&lt;wbr&gt;PCs&nbsp;&lt;wbr&gt;(XP&nbsp;&lt;wbr&gt;&amp;&nbsp;&lt;wbr&gt;Ubuntu)">.</p>


<p>&nbsp;</p>
<p>PS. Actually I made a porting ldtp.py that can be run under
Window XP too(just copy/paste), so that I can demonstrate ldtp to
my colleagues only a XP.</p>                                                        
                </div><br>Thanks<br>Nagappan<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Guofu Xu - 许国付</b> <span dir="ltr">&lt;<a href="mailto:Guofu.Xu@access-company.com">Guofu.Xu@access-company.com</a>&gt;</span><br>

Date: 2010/9/28<br>Subject: FYI. Debugging ldtp over net from 2 PCs<br>To: Nagappan Alagappan &lt;<a href="mailto:nagappan@gmail.com">nagappan@gmail.com</a>&gt;<br><br><br><br>
Hi Nags,<br>
<br>
I just wrote a blog that I can debug ldtp from 2 different place now.<br>
<br>
I like this way :)<br>
<br>
<a href="http://blog.sina.com.cn/s/blog_5fd6e7ac0100lxmi.html" target="_blank">http://blog.sina.com.cn/s/blog_5fd6e7ac0100lxmi.html</a><br>
<br>
Best Regards,<br>
<br>
Lavi (Guofu Xu)<br>
===================================<br>
Mp: &nbsp; &nbsp; 86-13951875404<br>
MSN: &nbsp; &nbsp;<a href="mailto:lavixu@hotmail.com">lavixu@hotmail.com</a><br>
Yahoo: &nbsp;<a href="mailto:lavixu@yahoo.com">lavixu@yahoo.com</a><br>
G-Mail: <a href="mailto:lavixu@gmail.com">lavixu@gmail.com</a> &nbsp;</div><br><br clear="all"><br>-- <br>Linux Desktop (GUI Application) Testing Project - <a href="http://ldtp.freedesktop.org">http://ldtp.freedesktop.org</a><br>

<a href="http://nagappanal.blogspot.com">http://nagappanal.blogspot.com</a><br>