<div dir="ltr">Hi Vince<div><br></div><div>Do you mean that you are cross-compiling LLDB or are you cross-compiling only LLDB-server ? </div><div>Can you share with me the procedure to do it? I couldn't find any documentation for it.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 27, 2015 at 5:06 AM, Vince Harron <span dir="ltr"><<a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">We are focusing on cross compiling the 32bit LLDB server from x86_64.  We will eventually need to compile the 32bit host binaries on Windows but we aren't focused on 32 but Mac/Linux hosts.  Please feel free to get this working.</p><span class="HOEnZb"><font color="#888888">
<p dir="ltr">Vince<br>
</p></font></span><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Feb 25, 2015 9:00 AM, "Abhishek Aggarwal" <<a href="mailto:abhiinnitald@gmail.com" target="_blank">abhiinnitald@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All<div><br></div><div>Thanks a lot for all the inputs. </div><div><br></div><div>@Greg: I could make it work using the lldb-platform. I had checked out source code of LLDB on Feb 16 and had built (Debug+Asserts) it on Fedora 20 system (x86_64). I will like to make few comments which are inlined. </div><div><br></div><div>@Vince: Are you building LLDB for x86_32 Linux ? I tried to build it (Debug build) for such a system and it fails during linking process because of lack of memory. </div><div>In order to bring up x86_32 support, are you following a different approach ? I read the thread initiated by you "Transitioning to Linux local debugging via<span style="white-space:pre-wrap"> </span>lldb-gdbserver" . Are you using this approach?</div><div>              </div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 24, 2015 at 11:34 PM, Vince Harron <span dir="ltr"><<a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">It's only really tested on x86_64->x86_64.  We are bringing up x86_32 and arm32/64 now-ish, MIPS soon to follow. <div><br><div>Please let us know if you hit any problems!<div><br></div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div></div></div></div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Tue, Feb 24, 2015 at 3:52 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The first way to do this is to use the lldb-platform to allow you to view and launch processes on the remote host.<br>
<br>
On the remote machine launch lldb-server:<br></blockquote></div></div></div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra"><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<a href="http://remote.foo.com" target="_blank">remote.foo.com</a>% lldb-server platform --listen=2000 --stay-alive<br>
<br></blockquote></div></div></div></div></blockquote><div><br></div><div>I had to replace "lldb-server platform" by "lldb-platform" because right now, building lldb doesn't generate any binary with name lldb-server.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra"><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Then on your host machine:<br>
<br>
<a href="http://host.bar.com" target="_blank">host.bar.com</a>% lldb<br>
(lldb) platform select remote-linux<br>
(lldb) platform connect connect://<a href="http://remote.foo.com:2000" target="_blank">remote.foo.com:2000</a><br>
<br>
Now you have a live connection to a platform server on the remote host so you can list existing processes:<br>
<br>
(lldb) platform process list<br>
(lldb) platform process attach --pid ...<br>
<br>
Or you can launch:<br>
<br>
(lldb) file /path/to/binary<br>
(lldb) process launch -- arg1 arg2<br>
<br>
The platform will launch a lldb-server to debug your programs on the other system.<br><br></blockquote></div></div></div></div></blockquote><div><br></div><div>This thing worked pretty well.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra"><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
The other is to just directly debug a process. In this case we don't go through the platform, we just start lldb-server on<br>
<br>
<a href="http://remote.foo.com" target="_blank">remote.foo.com</a>% lldb-server gdbserver <a href="http://host.bar.com:2000" target="_blank">host.bar.com:2000</a> -- arg1 arg2<br>
<br></blockquote></div></div></div></div></blockquote><div> </div><div>Again , I replaced "lldb-server gdbserver" by lldb-gdbserver.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra"><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Then attach to it:<br>
<br>
<a href="http://host.bar.com" target="_blank">host.bar.com</a>% lldb<br>
(lldb) file /path/to/binary<br>
(lldb) process connect connect://<a href="http://remote.foo.com:2000" target="_blank">remote.foo.com:2000</a><br>
<br></blockquote></div></div></div></div></blockquote><div><br></div><div>While running process connect command, I got the following error</div><div>       "error: remote connections are not supported"</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra"><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Now you will be stopped at the program entry point and ready to debug a single process.<br>
<br>
All of this is of course using the top of tree SVN sources. It will change a bit if you are using older sources.<br></blockquote></div></div></div></div></blockquote><div><br></div><div>The above error might be because my source code is old. But I am not sure given that the source code is 9 days old.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra"><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Greg<br>
<div><div><br>
<br>
> On Feb 24, 2015, at 6:09 AM, Abhishek Aggarwal <<a href="mailto:abhiinnitald@gmail.com" target="_blank">abhiinnitald@gmail.com</a>> wrote:<br>
><br>
> Hi All<br>
><br>
> I am new to LLDB. I want to remotely debug some applications. Both the host and target OS is Linux.<br>
><br>
> I went through few discussions in this list regarding remote debugging but I am still unclear about how to do it.<br>
> I could figure out from the discussions that there are 2 ways to do remote debugging: lldb-platform and lldb-gdbserver<br>
><br>
> I don't know which one of them is fully functional for Linux. I would highly appreciate some comments here.<br>
><br>
><br>
> Thanks<br>
> Abhiinnit<br>
</div></div>> _______________________________________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br>
<br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div><div dir="ltr"><br><table cellspacing="0" cellpadding="0" style="font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Vince Harron |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Technical Lead Manager |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> <a href="tel:858-442-0868" value="+18584420868" target="_blank">858-442-0868</a></td></tr></tbody></table><br></div></div>
</font></span></div>
</blockquote></div><br></div><div class="gmail_extra">Thanks </div><div class="gmail_extra"><br></div></div>
</blockquote></div>
</div></div></blockquote></div><br></div>