[Lldb-commits] [lldb] Fix a bug with cancelling "attach -w" after you have run a process previously (PR #65822)
    via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Fri Sep  8 17:05:26 PDT 2023
    
    
  
================
@@ -2996,10 +2996,22 @@ void CommandInterpreter::FindCommandsForApropos(llvm::StringRef search_word,
                            m_alias_dict);
 }
 
-ExecutionContext CommandInterpreter::GetExecutionContext() const {
-  return !m_overriden_exe_contexts.empty()
-             ? m_overriden_exe_contexts.top()
-             : m_debugger.GetSelectedExecutionContext();
+ExecutionContext CommandInterpreter::GetExecutionContext() {
+  ExecutionContext exe_ctx;
+  if (!m_overriden_exe_contexts.empty()) {
+    // During the course of a command, the target may have replaced the process 
+    // coming in with another.  If fix that here:
----------------
jimingham wrote:
Ah, not quite.  "If" -> "I".
https://github.com/llvm/llvm-project/pull/65822
    
    
More information about the lldb-commits
mailing list