[LDTP-Dev] Fwd: FYI. Debugging ldtp over net from 2 PCs
Nagappan Alagappan
nagappan at gmail.com
Tue Sep 28 13:28:17 PDT 2010
Hello all,
Thought will share this to the list :-)
Note: The blog was written based on LDTPv1
Debugging ldtp over net from 2 PCs (XP & Ubuntu) (2010-09-28 18:44:44)
转载
标签: 杂谈<http://uni.sina.com.cn/c.php?t=blog&k=%D4%D3%CC%B8&ts=bpost&stype=tag>
分类: ldtp <http://blog.sina.com.cn/s/articlelist_1607919532_3_1.html>
The working PC I'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 working under Windows(I tired to use cygwin gdb, but
failed to communicate device). I had to transfer to Ubuntu, that's not good.
One reason is that I don't like the fonts Linux offered, I never get a
stylish font in gedit.
And I have set an X11 forward feature from putty so that I can control the
simulator (x86 target) under Window XP, pretty much pro[image:
Debugging <wbr>ldtp <wbr>over <wbr>net <wbr>from <wbr>2 <wbr>PCs
<wbr>(XP <wbr>& <wbr>Ubuntu)]
.
Lucky, I have find a way to debug it under XP today, that's why I write to
here, hope it will help other if they never tried this, see picture below
for my target:
[image:
Debugging <wbr>ldtp <wbr>over <wbr>net <wbr>from <wbr>2 <wbr>PCs
<wbr>(XP <wbr>&
<wbr>Ubuntu)]<http://photo.blog.sina.com.cn/showpic.html#blogid=5fd6e7ac0100lxmi&url=http://static6.photo.sina.com.cn/orignal/5fd6e7acn914ffc30e645>
Both XP and Uubunut is running a port [ *2345* ]forward server, rinetd, the
config should be like this:
Window XP, forward the data to my device:
# bindadress bindport connectaddress connectport
0.0.0.0 2345 172.22.3.1 2345
Ubuntu, forward the data to remote server:
# bindadress bindport connectaddress connectport
0.0.0.0 2345 192.168.3.1 2345
Yes, I have SSH server on Ubuntu, so that I can control from XP(for X86 as
well).
So, after login into device, I issue to create a gdbserver listener:
/var/opt/home # gdbserver :2345 /usr/bin/ldtp -s
Process /usr/bin/ldtp created; pid = 1345
Listening on port 2345
Then connect by to that port:
$:)gdb /usr/local/bin/ldtp
No symbol table is loaded. Use the "file" command.
(gdb) target remote 127.0.0.1:2345
Remote debugging using 127.0.0.1:2345
[New Thread 1345]
0x410007d0 in ?? ()
(gdb) b main
Breakpoint 1 at 0xcda8: file ldtp.c, line 473.
That's done, Good enough[image:
Debugging <wbr>ldtp <wbr>over <wbr>net <wbr>from <wbr>2 <wbr>PCs
<wbr>(XP <wbr>& <wbr>Ubuntu)]
.
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.
Thanks
Nagappan
---------- Forwarded message ----------
From: Guofu Xu - 许国付 <Guofu.Xu at access-company.com>
Date: 2010/9/28
Subject: FYI. Debugging ldtp over net from 2 PCs
To: Nagappan Alagappan <nagappan at gmail.com>
Hi Nags,
I just wrote a blog that I can debug ldtp from 2 different place now.
I like this way :)
http://blog.sina.com.cn/s/blog_5fd6e7ac0100lxmi.html
Best Regards,
Lavi (Guofu Xu)
===================================
Mp: 86-13951875404
MSN: lavixu at hotmail.com
Yahoo: lavixu at yahoo.com
G-Mail: lavixu at gmail.com
--
Linux Desktop (GUI Application) Testing Project -
http://ldtp.freedesktop.org
http://nagappanal.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20100928/f7d3fab4/attachment.html>
More information about the LDTP-dev
mailing list