<div dir="ltr">Hi Greg,<div><br></div><div style>Thanks, this seems like a very plausible reason. </div><div style><br></div><div style>Two questions:</div><div style>1. Do I need to implement all the stop reply packet extensions (In the description it says that they are good for performance but no necessary) or just <span style="color:rgb(0,0,0);white-space:pre-wrap">qThreadStopInfo?</span></div>
<div style><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div style><span style="color:rgb(0,0,0);white-space:pre-wrap">2. I've looked at the ? command in my logs and saw that I'm receiving something different than T00, is this value Ok or also bad?</span></div>
<div style><br></div><div style>The log:</div><div style><div><font face="courier new, monospace">< 5> send packet: $?#3f</font></div><div><font face="courier new, monospace">size_t GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote &, uint32_t): Read (buffer, (sizeof(buffer), timeout_usec = 0xf4240, status = success, error = (null)) => bytes_read = 1</font></div>
<div><font face="courier new, monospace">< 1> read packet: +</font></div><div><font face="courier new, monospace">size_t GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote &, uint32_t): Read (buffer, (sizeof(buffer), timeout_usec = 0xf4240, status = success, error = (null)) => bytes_read = 52</font></div>
<div><font face="courier new, monospace" style="background-color:rgb(255,255,0)">< 52> read packet: $T0206:0*,;07:f08a5851ff7f0* ;10:2880276eff7f0* ;#67</font></div><div><font face="courier new, monospace">< 1> send packet: +</font></div>
<div><br></div><div style>Thanks for the help,</div><div style>Benjamin.</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 22, 2013 at 7:53 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I believe we have a bug where if you attach and the stop reply packet that we send immediately after the attach (the '?' packet) comes back with a T00 (meaning the thread stopped with signal 0, or no signal), we end up resuming the process. We normally get a T11 (SIGSTOP) when we first attach on MacOSX. This gives LLDB a reason for why the process stopped. It is also helpful if you add the stop reply packet extensions we have documented in the "lldb-gdb-remote.txt" file in our SVN repository:<br>
<br>
svn cat <a href="http://llvm.org/svn/llvm-project/lldb/trunk/docs/lldb-gdb-remote.txt" target="_blank">http://llvm.org/svn/llvm-project/lldb/trunk/docs/lldb-gdb-remote.txt</a><br>
<br>
See the section labeled "Stop reply packet extensions". The standard stop reply packet is really UNIX centric and it assumes every stop reason can be explained by a signal. We extended the contents of the key/value pairs that are returned to provide more complete information.<br>
<br>
Can you enable GDB packet logging and send me the output? I will be able to tell more from the log.<br>
<br>
To enable this logging:<br>
<br>
(lldb) log enable -f /tmp/packets.txt gdb-remote packets<br>
(lldb) … < connect to remote process > …<br>
(lldb) quit<br>
<br>
Then attach and send the packet.txt file.<br>
<span class="HOEnZb"><font color="#888888"><br>
Greg<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Jan 22, <a href="tel:2013" value="+9722013">2013</a>, at 6:55 AM, Benjamin Kemper <<a href="mailto:kemperbenny@gmail.com">kemperbenny@gmail.com</a>> wrote:<br>
<br>
> ProcessGDBRemote::UpdateThreadList (pid = 1799)<br>
> 0x7fe2aa2268b0: ThreadGDBRemote::ThreadGDBRemote (pid = 1799, tid = 0x0707)<br>
> < 22> send packet: $qThreadStopInfo707#99<br>
> size_t GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote &, uint32_t): Read (buffer, (sizeof(buffer), timeout_usec = 0xf4240, status = success, error = (null)) => bytes_read = 1<br>
> < 1> read packet: +<br>
> size_t GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote &, uint32_t): Read (buffer, (sizeof(buffer), timeout_usec = 0xf4240, status = success, error = (null)) => bytes_read = 4<br>
> < 4> read packet: $#00<br>
> < 1> send packet: +<br>
> error: failed to get response for 'qThreadStopInfo707'<br>
> ProcessGDBRemote::Resume()<br>
> ProcessGDBRemote::AsyncThread (arg = 0x7fe2ab00d000, pid = 1799) Got an event of type: 1...<br>
> ProcessGDBRemote::AsyncThread (arg = 0x7fe2ab00d000, pid = 1799) got eBroadcastBitAsyncContinue: vCont;c:0707<br>
> GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse ()<br>
> GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse () sending continue packet: vCont;c:0707<br>
> < 16> send packet: $vCont;c:0707#b0<br>
> size_t GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote &, uint32_t): Read (buffer, (sizeof(buffer), timeout_usec = 0xf4240, status = success, error = (null)) => bytes_read = 1<br>
> < 1> read packet: +<br>
> GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse () WaitForPacket(vCont;c:0707)<br>
> size_t GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote &, uint32_t): Read (buffer, (sizeof(buffer), timeout_usec = 0xffffffff, status = success, error = (null)) => bytes_read = 7<br>
> < 7> read packet: $W00#b7<br>
> < 1> send packet: +<br>
> GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse () got packet: W00<br>
> GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse () => exited<br>
> ProcessGDBRemote::AsyncThread (arg = 0x7fe2ab00d000, pid = 1799) thread exiting...<br>
><br>
<br>
</div></div></blockquote></div><br></div>