<div dir="ltr">(And yes, it does make for a long exe name!)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 8:02 AM, Todd Fiala <span dir="ltr"><<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Zachary,<div><br></div><div>Great question.  Way back in December when Greg Clayton and I talked about it (this very thing, in fact), we decided it was proper to pay homage to gdbserver since:</div>
<div>1. It is using the gdb-remote protocol as initially spec'd out by gdb, and</div>
<div>2. It is lldb's internal version of a server running the gdb-remote protocol, and thus is a gdbserver of sorts.</div><div><br></div><div>It does run on the gdb-remote protocol.  It does support many of the debugserver extensions, and will eventually support them all.  Greg intends to move Apple over from debugserver to lldb-gdbserver when the timing is right.</div>

<div><br></div><div>I have not tried to ensure that lldb-gdbserver can drop in for gdbserver with other clients (e.g. gdb).  However, I have been testing lldb-gdbserver (we're calling it llgs for short) at the protocol level along with debugserver, and I have fixed up a couple places where we were not obeying the gdb-remote protocol spec.  Also, I have been fixing up lldb where it fails to work with llgs when llgs was implementing the spec but didn't have every single feature of debugserver.  So it is likely we're also improving our compliance with the gdb-remote spec, FWIW.</div>

<div><br></div><div>Hope that helps!</div><div><br></div><div>-Todd</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Wed, Jun 25, 2014 at 9:03 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Forgive the potentially noobish question, as I have little to no experience with GDB, but why is this called lldb-gdbserver?  Why isn't it just called lldb-server?  The name makes it sounds like lldb-gdbserver doesn't apply to you if you have no interest in interfacing with GDB.  Is that accurate or inaccurate?</div>


<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Wed, Jun 25, 2014 at 1:41 PM, Todd Fiala <span dir="ltr"><<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi all,<div><br></div><div>I'm targeting getting the lldb-gdbserver (llgs) branch upstreamed into the lldb svn trunk by June 30th 2014 (next Monday).</div>


<div><br></div><div>The current state of the branch:</div>
<div><ul><li>lldb-gdbserver is essentially working for Linux x86_64 targets.  </li><li>Breakpoints, code correlation, backtraces, expression execution in inferior memory all work in simple test scenarios.</li><li>It touches minimal code from the existing branch, although it does share a fair amount of code with lldb-platform, particularly in GDBRemoteCommunicationServer.</li>



<li>lldb-platform for linux x86_64 is not yet implemented.  I'll be doing that shortly after upstreaming so we can run the remote test suite against lldb and llgs running remotely.</li><li>I've done some work to support loading elf files for other platforms on a given host.  (e.g. command-line MacOSX lldb connecting to Linux x86_64 llgs somewhat works, as should FreeBSD lldb over to Linux x86_64.)  I added off-host elf support for Linux, FreeBSD and NetBSD elf files if they have known elf note sections to identify or use the OSABI byte in the elf header and are loaded on a system different than the target ABI system.</li>



<li>I've added a host of gdb-remote-protocol tests to test/tools/lldb-gdbserver.  These run tests against debugserver and llgs.  I used them to ensure that llgs was behaving identically at the gdb-remote protocol level to debugserver.  I upstreamed the vast majority of these already - they're marked XFAIL for llgs.  Those are all implemented in the llgs branch and passing.</li>



</ul><div>I'm doing a minimal set of tasks to complete the branch to the point of upstreaming:</div><div><ul><li>Removing dead code.  I did borrow a fair amount of code from RegisterContext* and the Linux ProcessMonitor, but in some cases there is more code there than needed.</li>



<li>Run through the FIXME comments to see if anything super egregious should be fixed before upstreaming.</li></ul><div>If you are interested in testing llgs on a linux_x86_64 host and target, please have at it.  The llgs branch is located <a href="https://github.com/tfiala/lldb/tree/dev-tfiala-native-protocol-linux-x86_64" target="_blank">here</a> on github. File any issues you hit on the <a href="http://llvm.org" target="_blank">llvm.org</a> bugzilla.  At this point I'm looking to get it in sooner than later, since more recent activity in lldb has been causing merging pains and the vast majority of the llgs code paths don't intersect with local debugging paths (yet).</div>



</div><div><br></div><div> I appreciate any and all feedback on it.  After the Linux x86_64 support is ironed out, I plan to get a few other Linux architectures working, and (ultimately) getting the Android llgs working so we can debug Android devices with LLDB.</div>



<div><br></div><div>Thanks!<br></div><div><br></div><div>Sincerely,</div><div>Todd Fiala<br></div>
</div></div>
<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></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr">-Todd</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">-Todd</div>
</div>