<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.m-9172928429246449152gmail-
{mso-style-name:m_-9172928429246449152gmail-;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:56.7pt 42.5pt 56.7pt 85.05pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">It seems that ‘process launch’ tries to launch gdb-server that is already started manually, try to attach instead.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I also met ‘remote-gdb-server’ platform, maybe it fits your goal better? Didn’t you try to do something like this</span>?<span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal">dotest.py --platform-name=remote-gdb-server --platfrom-url=connect://hostname:port --arch=architecture ...
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> lldb-dev [mailto:lldb-dev-bounces@lists.llvm.org]
<b>On Behalf Of </b>cui bixiong via lldb-dev<br>
<b>Sent:</b> Friday, 27 October, 2017 9:41 AM<br>
<b>To:</b> Greg Clayton <clayborg@gmail.com><br>
<b>Cc:</b> lldb-dev <lldb-dev@lists.llvm.org><br>
<b>Subject:</b> Re: [lldb-dev] did anyone konw LLDB support lldb + openocd to run dotest.py in bare board like ARM or other non-x86 architecture?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black">Hi :<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> I build a armhf qemu enviroment to test ARM lldb + lldb-server testsuite. source code base on LLVM + LLDB + LLD + CLANG formal release 5.0.0.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Target: lldb-server platform --listen *</span><span style="font-family:"MS Gothic";color:black">:</span><span style="font-family:"Verdana",sans-serif;color:black">3333 --server<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Host : <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> (lldb) platform select remote-linux<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Platform: remote-linux<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Connected: no<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> (lldb) platform connect connect://<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__0.0.0.0-3A3333&d=DwMFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=yfnu24japkhNGh-WqJObHXmH3mINtC_2FO828lrNpM0&m=uN6_uN-vbhkIBUYfgaia_IIUZ-KsQTwmy_orALFBdnw&s=gG9WkTsbhG3Ylm1kB0uyHUObWovqkIKU8ax052TDtxY&e=">0.0.0.0:3333</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Platform: remote-linux<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Triple: arm-*-linux-gnueabihf<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> OS Version: 3.2.0 (3.2.0-4-vexpress)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Kernel: #1 SMP Debian 3.2.51-1<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Hostname: debian-armhf.""<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Connected: yes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> WorkingDir: /root<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> (lldb) file ./hello.exe<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> Current executable set to './hello.exe' (arm).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> (lldb) log enable gdb-remote packets<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> (lldb) process launch<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[1] tid=0x6192 < 1> send packet: +<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[2] tid=0x6192 < 19> send packet: $QStartNoAckMode#b0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[3] tid=0x6192 < 1> read packet: +<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[4] tid=0x6192 < 6> read packet: $OK#9a<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[5] tid=0x6192 < 1> send packet: +<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[6] tid=0x6192 < 13> send packet: $qHostInfo#9b<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[7] tid=0x6192 < 297> read packet: $triple:61726d2d2d6c696e75782d676e75656162696866;ptrsize:4;distribution_id:64656269616e;watchpoint_exceptions_received:before;endian:little;os_version:3.2.0;os_build:332e322e302d342d7665787072657373;os_kernel:233120534d502044656269616e20332e322e35312d31;hostname:64656269616e2d61726d68662e2222;#1a<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[8] tid=0x6192 < 18> send packet: $qGetWorkingDir#91<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[9] tid=0x6192 < 14> read packet: $2f726f6f74#a4<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[10] tid=0x6192 < 19> send packet: $qQueryGDBServer#cb<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[11] tid=0x6192 < 7> read packet: $E04#a9<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[12] tid=0x6192 < 73> send packet: $qModuleInfo:2e2f68656c6c6f2e657865;61726d2d2d6c696e75782d656162696866#b7<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black">history[13] tid=0x6192 < 7> read packet: $E03#a8<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black">history[14] tid=0x6192 < 69> send packet: $qModuleInfo:6c6962632e736f2e36;61726d2d2d6c696e75782d656162696866#7b<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> history[15] tid=0x6192 < 7> read packet: $E03#a8<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black">< 36> send packet: $qLaunchGDBServer;host:mtkslt202;#b1<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> error: unable to launch a GDB server on 'debian-armhf.""'<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black"> i show host and port is uncorrect, is it a bug?<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black">Best Regards<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black">--cuibixiong<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Oct 24, 2017 at 11:04 PM, Greg Clayton <<a href="mailto:clayborg@gmail.com" target="_blank">clayborg@gmail.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Oct 24, 2017, at 12:02 AM, cui bixiong <<a href="mailto:cuibixiong@gmail.com" target="_blank">cuibixiong@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif">Hi<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif"> sorry</span><span style="font-family:"MS Gothic"">,</span><span style="font-family:"Verdana",sans-serif"> i'm confuse, in my mind, lldb-server maybe like gdb-server, running on Linux-like
platform listening RSP command which send form gdb and use ptrace syscall to debug which you want to debug program<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif"> is it support remote download to batch mode run all testsuite? certainly i think reset baseboard is very important feature too, but in lldb-server maybe not support currently i guess.<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Yes lldb-server does support a full connection to a remote OS. On baseboards you are typically debugging the entire OS so lldb-server won't work because you have to OS to run it in the background. Supporting the test suite on baseboards
will take some effort.<o:p></o:p></p>
</div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif">Best Regards<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif">--cuibixiong<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Mon, Oct 23, 2017 at 11:06 PM, Greg Clayton <<a href="mailto:clayborg@gmail.com" target="_blank">clayborg@gmail.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<span class="m-9172928429246449152gmail-">> On Oct 22, 2017, at 6:21 AM, cuibixiong via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:</span><br>
<span class="m-9172928429246449152gmail-">></span><br>
<span class="m-9172928429246449152gmail-">> Hi</span><br>
<span class="m-9172928429246449152gmail-">></span><br>
<span class="m-9172928429246449152gmail-">> did anyone konw LLDB support lldb + openocd to run dotest.py in bare board like ARM or other non-x86 architecture?</span><br>
<br>
We run the test suite on iOS devices using the platform stuff. This requires a running lldb-server on the remote system, so we only have the test suite running when we have the lldb-server running in platform mode on the other side. For this to work with baseboards,
we would need the JTAG box to respond to many GDB remote protocol packets that "lldb-server platform" implements. I am sure for baseboards the test suite would need to be modified. A few ideas there:<br>
- Have the test suite watch for a triple with no os (like "arm64-none-none") and have it go into a baseboard mode<br>
- Many tests that might rely on writing to files, reading from files for stdin, and others, would need to be skipped in this mode<br>
- Any tests that build and debug shared libraries would either need to be modified to build multiple static binaries or skipped<br>
- We might need to make a Bareboard platform and would load the ELF files into memory instead of copying them over like the current platforms do<br>
<br>
So there would be quite a lot of modifications required to get the test suite running. We will be happy to help you if you choose to try this.<br>
<br>
Greg Clayton<br>
<br>
><br>
> Best Regards<br>
> —cuibixiong<br>
> _______________________________________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_lldb-2Ddev&d=DwMFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=yfnu24japkhNGh-WqJObHXmH3mINtC_2FO828lrNpM0&m=uN6_uN-vbhkIBUYfgaia_IIUZ-KsQTwmy_orALFBdnw&s=XumZaATwR447RuANlMXxfm7a3f09ZfjC48JPk393PvE&e=" target="_blank">
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>