The regular expression command object was resetting the execution context of the
resolved command, which it should not do. It should adopt whatever context the
regular expression command was called with. This was causing regular expression
commands run inside breakpoint commands to adopt the currently selected context,
not the one coming from the breakpoint that we hit.
<rdar://problem/13411771>
llvm-svn: 177195
diff --git a/lldb/source/Interpreter/CommandObjectRegexCommand.cpp b/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
index 5ee44e2..05d6e09 100644
--- a/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
+++ b/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
@@ -80,7 +80,9 @@
// Interpret the new command and return this as the result!
if (m_interpreter.GetExpandRegexAliases())
result.GetOutputStream().Printf("%s\n", new_command.c_str());
- return m_interpreter.HandleCommand(new_command.c_str(), eLazyBoolCalculate, result);
+ // Pass in true for "no context switching". The command that called us should have set up the context
+ // appropriately, we shouldn't have to redo that.
+ return m_interpreter.HandleCommand(new_command.c_str(), eLazyBoolCalculate, result, NULL, true, true);
}
}
result.SetStatus(eReturnStatusFailed);