[Lldb-commits] [lldb] r201773 - Improve the handling of stop-reply packet when it does not contain
Hafiz Abid Qadeer
hafiz_abid at mentor.com
Thu Feb 20 02:23:20 PST 2014
Author: abidh
Date: Thu Feb 20 04:23:20 2014
New Revision: 201773
URL: http://llvm.org/viewvc/llvm-project?rev=201773&view=rev
Log:
Improve the handling of stop-reply packet when it does not contain
thread information.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=201773&r1=201772&r2=201773&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Feb 20 04:23:20 2014
@@ -1645,6 +1645,21 @@ ProcessGDBRemote::SetThreadStopInfo (Str
}
}
+ // If the response is old style 'S' packet which does not provide us with thread information
+ // then update the thread list and choose the first one.
+ if (!thread_sp)
+ {
+ UpdateThreadIDList ();
+
+ if (!m_thread_ids.empty ())
+ {
+ Mutex::Locker locker (m_thread_list_real.GetMutex ());
+ thread_sp = m_thread_list_real.FindThreadByProtocolID (m_thread_ids.front (), false);
+ if (thread_sp)
+ gdb_thread = static_cast<ThreadGDBRemote *> (thread_sp.get ());
+ }
+ }
+
if (thread_sp)
{
// Clear the stop info just in case we don't set it to anything
More information about the lldb-commits
mailing list