[Lldb-commits] [PATCH] D48868: [LLDB] In ProcessGDBRemote::UpdateThreadIDList(), the thread PCs should not be cleared after they are updated from the stop reply packet

Venkata Ramanaiah via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 3 02:07:30 PDT 2018


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:");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48868.153875.patch
Type: text/x-patch
Size: 911 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180703/0e6b0aab/attachment.bin>


More information about the lldb-commits mailing list