aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-04-26 22:43:16 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-04-26 22:43:16 +0000
commit2b29b432d206ee706538b8dad54806d7649fb378 (patch)
treec1c288a9ee56edb568e0f4eb8925b5215ee50c97 /lldb/source/Commands/CommandObjectWatchpointCommand.cpp
parent3bf116c1a4f88d6e3f3fd0887453dea3569e0823 (diff)
downloadllvm-2b29b432d206ee706538b8dad54806d7649fb378.zip
llvm-2b29b432d206ee706538b8dad54806d7649fb378.tar.gz
llvm-2b29b432d206ee706538b8dad54806d7649fb378.tar.bz2
[ScriptInterpreter] Move ownership into debugger (NFC)
This is part two of the change started in r359330. This patch moves the ownership of the script interpreter from the command interpreter into the debugger. I would've preferred to remove the lazy initialization, however the fact that the scripting language is set after the debugger is created makes that tricky. So for now this does exactly the same thing as when it was under the command interpreter. The result is that this patch is fully NFC. Differential revision: https://reviews.llvm.org/D61211 llvm-svn: 359354
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpointCommand.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectWatchpointCommand.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index 29c8592..8894d2c 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -442,7 +442,7 @@ protected:
if (m_options.m_use_script_language) {
// Special handling for one-liner specified inline.
if (m_options.m_use_one_liner) {
- m_interpreter.GetScriptInterpreter()->SetWatchpointCommandCallback(
+ GetDebugger().GetScriptInterpreter()->SetWatchpointCommandCallback(
wp_options, m_options.m_one_liner.c_str());
}
// Special handling for using a Python function by name instead of
@@ -452,10 +452,11 @@ protected:
else if (!m_options.m_function_name.empty()) {
std::string oneliner(m_options.m_function_name);
oneliner += "(frame, wp, internal_dict)";
- m_interpreter.GetScriptInterpreter()->SetWatchpointCommandCallback(
+ GetDebugger().GetScriptInterpreter()->SetWatchpointCommandCallback(
wp_options, oneliner.c_str());
} else {
- m_interpreter.GetScriptInterpreter()
+ GetDebugger()
+ .GetScriptInterpreter()
->CollectDataForWatchpointCommandCallback(wp_options, result);
}
} else {