aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandObject.cpp
diff options
context:
space:
mode:
authorGongyu Deng <gy_deng@icloud.com>2020-03-06 10:10:24 -0800
committerRaphael Isemann <teemperor@gmail.com>2020-03-06 10:44:00 -0800
commitec31255c00808dac40710173162f22e4ee89a2fe (patch)
tree4691d62f1b21029c0cf54daffe84fc9da12d5586 /lldb/source/Interpreter/CommandObject.cpp
parent1badf7c33a5d01900c77646f750e2ea11ad8bf5a (diff)
downloadllvm-ec31255c00808dac40710173162f22e4ee89a2fe.zip
llvm-ec31255c00808dac40710173162f22e4ee89a2fe.tar.gz
llvm-ec31255c00808dac40710173162f22e4ee89a2fe.tar.bz2
[lldb] Update the current execution context at the beginning of tab completions
Summary: Fix a bug that tab completions won't synchronous the current execution context. ( Thanks for Jim's explanation! ) Reviewers: teemperor, labath, jingham Reviewed By: jingham Subscribers: jingham, labath Tags: #lldb Differential Revision: https://reviews.llvm.org/D75597
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r--lldb/source/Interpreter/CommandObject.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index b87ca44..01fa86750 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -267,6 +267,9 @@ void CommandObject::Cleanup() {
}
void CommandObject::HandleCompletion(CompletionRequest &request) {
+
+ m_exe_ctx = m_interpreter.GetExecutionContext();
+
// Default implementation of WantsCompletion() is !WantsRawCommandString().
// Subclasses who want raw command string but desire, for example, argument
// completion should override WantsCompletion() to return true, instead.
@@ -293,6 +296,8 @@ void CommandObject::HandleCompletion(CompletionRequest &request) {
// If we got here, the last word is not an option or an option argument.
HandleArgumentCompletion(request, opt_element_vector);
}
+
+ m_exe_ctx.Clear();
}
bool CommandObject::HelpTextContainsWord(llvm::StringRef search_word,