ramana-nvr created this revision.
ramana-nvr added a reviewer: labath.

The function ProcessGDBRemote::UpdateThreadIDsFromStopReplyThreadsValue(), 
which is being called after the thread PCs are updated, is clearing the thread 
PC list and that is wrong.


https://reviews.llvm.org/D48868

Files:
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp


Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1523,7 +1523,6 @@
 size_t
 ProcessGDBRemote::UpdateThreadIDsFromStopReplyThreadsValue(std::string &value) 
{
   m_thread_ids.clear();
-  m_thread_pcs.clear();
   size_t comma_pos;
   lldb::tid_t tid;
   while ((comma_pos = value.find(',')) != std::string::npos) {
@@ -1598,7 +1597,6 @@
         StringExtractorGDBRemote &stop_info = m_stop_packet_stack[i];
         const std::string &stop_info_str = stop_info.GetStringRef();
 
-        m_thread_pcs.clear();
         const size_t thread_pcs_pos = stop_info_str.find(";thread-pcs:");
         if (thread_pcs_pos != std::string::npos) {
           const size_t start = thread_pcs_pos + strlen(";thread-pcs:");


Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1523,7 +1523,6 @@
 size_t
 ProcessGDBRemote::UpdateThreadIDsFromStopReplyThreadsValue(std::string &value) {
   m_thread_ids.clear();
-  m_thread_pcs.clear();
   size_t comma_pos;
   lldb::tid_t tid;
   while ((comma_pos = value.find(',')) != std::string::npos) {
@@ -1598,7 +1597,6 @@
         StringExtractorGDBRemote &stop_info = m_stop_packet_stack[i];
         const std::string &stop_info_str = stop_info.GetStringRef();
 
-        m_thread_pcs.clear();
         const size_t thread_pcs_pos = stop_info_str.find(";thread-pcs:");
         if (thread_pcs_pos != std::string::npos) {
           const size_t start = thread_pcs_pos + strlen(";thread-pcs:");
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to