1 //===-- ScriptInterpreterPython.h -------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H
10 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H
12 #ifdef LLDB_DISABLE_PYTHON
14 // Python is disabled in this build
18 #include "lldb/Breakpoint/BreakpointOptions.h"
19 #include "lldb/Core/IOHandler.h"
20 #include "lldb/Interpreter/ScriptInterpreter.h"
21 #include "lldb/lldb-private.h"
27 namespace lldb_private {
28 /// Abstract interface for the Python script interpreter.
29 class ScriptInterpreterPython : public ScriptInterpreter,
30 public IOHandlerDelegateMultiline {
32 class CommandDataPython : public BreakpointOptions::CommandData {
34 CommandDataPython() : BreakpointOptions::CommandData() {
35 interpreter = lldb::eScriptLanguagePython;
39 ScriptInterpreterPython(Debugger &debugger)
40 : ScriptInterpreter(debugger, lldb::eScriptLanguagePython),
41 IOHandlerDelegateMultiline("DONE") {}
43 static void Initialize();
44 static void Terminate();
45 static lldb_private::ConstString GetPluginNameStatic();
46 static const char *GetPluginDescriptionStatic();
47 static FileSpec GetPythonDir();
50 static void ComputePythonDirForApple(llvm::SmallVectorImpl<char> &path);
51 static void ComputePythonDirForPosix(llvm::SmallVectorImpl<char> &path);
52 static void ComputePythonDirForWindows(llvm::SmallVectorImpl<char> &path);
54 } // namespace lldb_private
56 #endif // LLDB_DISABLE_PYTHON
57 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H