From 8d1fb843274175022b21f348d69a91f3573e1514 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 26 Apr 2019 17:58:19 +0000 Subject: [ScriptInterpreter] Pass the debugger instead of the command interpreter As discussed in D61090, there's no good reason for the script interpreter to depend on the command interpreter. When looking at the code, it becomes clear that we mostly use the command interpreter as a way to access the debugger. Hence, it makes more sense to just pass that to the script interpreter directly. This is part 1 out of 2. I have another patch in the pipeline that changes the ownership of the script interpreter to the debugger as well, but I didn't get around to finish that today. Differential revision: https://reviews.llvm.org/D61172 llvm-svn: 359330 --- .../Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h index 7a0cf7403d4..a9993c4068a 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h @@ -29,7 +29,7 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython { public: friend class IOHandlerPythonInterpreter; - ScriptInterpreterPythonImpl(CommandInterpreter &interpreter); + ScriptInterpreterPythonImpl(Debugger &debugger); ~ScriptInterpreterPythonImpl() override; @@ -273,8 +273,7 @@ public: void IOHandlerInputComplete(IOHandler &io_handler, std::string &data) override; - static lldb::ScriptInterpreterSP - CreateInstance(CommandInterpreter &interpreter); + static lldb::ScriptInterpreterSP CreateInstance(Debugger &debugger); // PluginInterface protocol lldb_private::ConstString GetPluginName() override; -- cgit v1.2.3