diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-26 22:43:16 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-26 22:43:16 +0000 |
commit | 2b29b432d206ee706538b8dad54806d7649fb378 (patch) | |
tree | c1c288a9ee56edb568e0f4eb8925b5215ee50c97 /lldb/source/Plugins/ScriptInterpreter/Python | |
parent | 3bf116c1a4f88d6e3f3fd0887453dea3569e0823 (diff) | |
download | bcm5719-llvm-2b29b432d206ee706538b8dad54806d7649fb378.tar.gz bcm5719-llvm-2b29b432d206ee706538b8dad54806d7649fb378.zip |
[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/Plugins/ScriptInterpreter/Python')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index eabbdcc373a..a4959265fad 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -1285,9 +1285,8 @@ void ScriptInterpreterPythonImpl::SetBreakpointCommandCallbackFunction( std::string oneliner("return "); oneliner += function_name; oneliner += "(frame, bp_loc, internal_dict)"; - m_debugger.GetCommandInterpreter() - .GetScriptInterpreter() - ->SetBreakpointCommandCallback(bp_options, oneliner.c_str()); + m_debugger.GetScriptInterpreter()->SetBreakpointCommandCallback( + bp_options, oneliner.c_str()); } Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback( @@ -1862,8 +1861,7 @@ StructuredData::ObjectSP ScriptInterpreterPythonImpl::CreateScriptedThreadPlan( return StructuredData::ObjectSP(); Debugger &debugger = thread_plan_sp->GetTarget().GetDebugger(); - ScriptInterpreter *script_interpreter = - debugger.GetCommandInterpreter().GetScriptInterpreter(); + ScriptInterpreter *script_interpreter = debugger.GetScriptInterpreter(); ScriptInterpreterPythonImpl *python_interpreter = static_cast<ScriptInterpreterPythonImpl *>(script_interpreter); @@ -1967,8 +1965,7 @@ ScriptInterpreterPythonImpl::CreateScriptedBreakpointResolver( return StructuredData::GenericSP(); Debugger &debugger = bkpt_sp->GetTarget().GetDebugger(); - ScriptInterpreter *script_interpreter = - debugger.GetCommandInterpreter().GetScriptInterpreter(); + ScriptInterpreter *script_interpreter = debugger.GetScriptInterpreter(); ScriptInterpreterPythonImpl *python_interpreter = static_cast<ScriptInterpreterPythonImpl *>(script_interpreter); @@ -2083,8 +2080,7 @@ ScriptInterpreterPythonImpl::CreateSyntheticScriptedProvider( return StructuredData::ObjectSP(); Debugger &debugger = target->GetDebugger(); - ScriptInterpreter *script_interpreter = - debugger.GetCommandInterpreter().GetScriptInterpreter(); + ScriptInterpreter *script_interpreter = debugger.GetScriptInterpreter(); ScriptInterpreterPythonImpl *python_interpreter = (ScriptInterpreterPythonImpl *)script_interpreter; @@ -2262,8 +2258,7 @@ bool ScriptInterpreterPythonImpl::BreakpointCallbackFunction( return true; Debugger &debugger = target->GetDebugger(); - ScriptInterpreter *script_interpreter = - debugger.GetCommandInterpreter().GetScriptInterpreter(); + ScriptInterpreter *script_interpreter = debugger.GetScriptInterpreter(); ScriptInterpreterPythonImpl *python_interpreter = (ScriptInterpreterPythonImpl *)script_interpreter; @@ -2313,8 +2308,7 @@ bool ScriptInterpreterPythonImpl::WatchpointCallbackFunction( return true; Debugger &debugger = target->GetDebugger(); - ScriptInterpreter *script_interpreter = - debugger.GetCommandInterpreter().GetScriptInterpreter(); + ScriptInterpreter *script_interpreter = debugger.GetScriptInterpreter(); ScriptInterpreterPythonImpl *python_interpreter = (ScriptInterpreterPythonImpl *)script_interpreter; |