wallace updated this revision to Diff 314035.
wallace added a comment.

nit


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93874/new/

https://reviews.llvm.org/D93874

Files:
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  lldb/test/API/functionalities/exec/TestExec.py


Index: lldb/test/API/functionalities/exec/TestExec.py
===================================================================
--- lldb/test/API/functionalities/exec/TestExec.py
+++ lldb/test/API/functionalities/exec/TestExec.py
@@ -88,6 +88,10 @@
         int_value = value.GetValueAsSigned()
         self.assertTrue(int_value == 3, "Expression got the right result.")
 
+        # Single step to create a thread plan. We have to make sure that after 
exec
+        # we clear all existing thread plans.
+        thread.StepInstruction(False)
+
         # Run and we should stop due to exec
         process.Continue()
 
Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2613,6 +2613,7 @@
 
     m_thread_list_real.Clear();
     m_thread_list.Clear();
+    m_thread_plans.Clear();
     BuildDynamicRegisterInfo(true);
     m_gdb_comm.ResetDiscoverableSettings(did_exec);
   }


Index: lldb/test/API/functionalities/exec/TestExec.py
===================================================================
--- lldb/test/API/functionalities/exec/TestExec.py
+++ lldb/test/API/functionalities/exec/TestExec.py
@@ -88,6 +88,10 @@
         int_value = value.GetValueAsSigned()
         self.assertTrue(int_value == 3, "Expression got the right result.")
 
+        # Single step to create a thread plan. We have to make sure that after exec
+        # we clear all existing thread plans.
+        thread.StepInstruction(False)
+
         # Run and we should stop due to exec
         process.Continue()
 
Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2613,6 +2613,7 @@
 
     m_thread_list_real.Clear();
     m_thread_list.Clear();
+    m_thread_plans.Clear();
     BuildDynamicRegisterInfo(true);
     m_gdb_comm.ResetDiscoverableSettings(did_exec);
   }
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to