diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/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); } diff --git a/lldb/test/API/functionalities/exec/TestExec.py b/lldb/test/API/functionalities/exec/TestExec.py --- a/lldb/test/API/functionalities/exec/TestExec.py +++ b/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.StepInto() + # Run and we should stop due to exec process.Continue()