<div dir="ltr">(by "Monday" I seem to have meant "virtual Monday after the holiday").<br><div><br></div><div>I have some code in my sandbox that properly reads the auxv via the packet, and it certainly looks like it's working (auxv entries that are addresses look like addresses, and auxv entries that look like numbers look like reasonable numbers), but I can't fully test it because I have another issue specific to debugging on Android.</div>
<div><br></div><div>The way I've changed it to work is that AuxVector::GetAuxvData(), instead of delegating to the Host, delegates to the process.  The base Process delegates to the Host as before, but ProcessGDBRemote asks via the packet (if it's supported, otherwise falling back to the base Process implementation).</div>
<div><br></div><div>If anyone is interested in this right away I can break it out as a separate patch; otherwise I'll wait until I can get it fully tested on my system.</div><div><br></div><div> - Steve</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 9:13 AM, Steve Pucci <span dir="ltr"><<a href="mailto:spucci@google.com" target="_blank">spucci@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">Right.  I've actually got a sandbox where I'm trying to load the auxv via the packet right now -- it's almost coded but I'm working on something else until at least Monday.<div><br></div><div>

It's not clear to me what the right architecture here is.  Up until this week I was proceeding under the assumption that in the remote case (where we're using ProcessGDBRemote) we should have a dynamic loader that is specific to that case, and in another sandbox I have a DynamicLoaderPOSIXDYLD plug-in that loads library load addresses via the qXfer:libraries:read and qXfer:libraries-svr4:read packets (that code is working, but the rest of the plug in isn't written yet).  But as I get more into the implementation I'm wondering if maybe we should just make sure that the POSIX dynamic loader does all of its actions via abstract methods that will go across the gdbserver as required to load memory from the target.</div>

<div><br></div><div>Greg actually suggested the latter approach quite a while back, but I didn't realize at the time how much of lldb abstracts the way we access target information, so when I ran into the issue with auxv I thought it was the tip of a larger iceberg and I went down the path of creating a special dynamic loader plug-in. </div>

<div><br></div><div>I'll know more next week after I try loading the auxv via packets.  In the meantime if anyone has any thoughts, please feel free to comment...</div><div><br></div><div>Thanks,</div><div>  Steve</div>

</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 8:42 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@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">Hey Abid,<div><br></div><div>Steve Pucci, working on getting lldb working with a stock Android gdbserver, has run into at last one of those issues above (I think issue 4).  He'll probably have some comments on at least a part of it.</div>


</div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 2:38 AM, Abid, Hafiz <span dir="ltr"><<a href="mailto:Hafiz_Abid@mentor.com" target="_blank">Hafiz_Abid@mentor.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
I was trying to make the LLDB talk to QEMU. I have identified a few problems as described below. I will be sending patches in the coming days. Just wanted to inform the community in case someone else is also working in this area.<br>



<br>
1. The thread ids sent by the qemu start with 0. In LLDB, we treat 0 as invalid thread id. Probably we need to change the definition of LLDB_INVALID_THREAD_ID.<br>
2. The stop reply packet from qemu is 'S05'. Code in ProcessGDBRemote::SetThreadStopInfo ()  does not handle this case properly. It assumes that there will be n:r pair with thread info.<br>
<a href="https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html" target="_blank">https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html</a><br>
3. We obviously need to provide a target description file with correct register information for qemu.<br>
4. The Posix dynamic loader is trying to use auxv vector on host for calculating the entry address for remote target (AuxVector::GetAuxvData). This can only works when the inferior and debugger are on the same system. Due to this reason, we end up calculating wrong load address for remote case. We may like to add support for 'qXfer:auxv:read' but should also deal better when this information is not supplied by the remote target.<br>



<br>
Thoughts/comments are most welcome.<br>
<br>
Thanks,<br>
Abid<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 dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);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">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>


<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>


<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</font></span></div>
<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>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>