|
LLDB mainline
|
Abstract interface for the Python script interpreter. More...
#include <ScriptInterpreterPython.h>
Classes | |
| class | CommandDataPython |
Static Public Member Functions | |
| static void | Initialize () |
| static void | Terminate () |
| static llvm::StringRef | GetPluginNameStatic () |
| static llvm::StringRef | GetPluginDescriptionStatic () |
| static FileSpec | GetPythonDir () |
| static void | SharedLibraryDirectoryHelper (FileSpec &this_file) |
| Static Public Member Functions inherited from lldb_private::ScriptInterpreter | |
| static std::string | LanguageToString (lldb::ScriptLanguage language) |
| static lldb::ScriptLanguage | StringToLanguage (const llvm::StringRef &string) |
| static llvm::StringLiteral | ExtensionToString (lldb::ScriptedExtension extension) |
| static lldb::ScriptedExtension | StringToExtension (llvm::StringRef string) |
Protected Member Functions | |
| llvm::Error | ParseExtensionSchema (Stream &s, llvm::StringRef output_script_prefix, const llvm::SmallVector< llvm::StringRef > &extension_path, bool generate_non_abstract_methods, std::set< std::string > &typing_imports) |
| llvm::Expected< StructuredData::ObjectSP > | GetExtensionSchema (const llvm::SmallVector< llvm::StringRef > &extension_path) |
Static Protected Member Functions | |
| static void | ComputePythonDirForApple (llvm::SmallVectorImpl< char > &path) |
| static void | ComputePythonDir (llvm::SmallVectorImpl< char > &path) |
Additional Inherited Members | |
| Public Types inherited from lldb_private::ScriptInterpreter | |
| enum | ScriptReturnType { eScriptReturnTypeCharPtr , eScriptReturnTypeBool , eScriptReturnTypeShortInt , eScriptReturnTypeShortIntUnsigned , eScriptReturnTypeInt , eScriptReturnTypeIntUnsigned , eScriptReturnTypeLongInt , eScriptReturnTypeLongIntUnsigned , eScriptReturnTypeLongLong , eScriptReturnTypeLongLongUnsigned , eScriptReturnTypeFloat , eScriptReturnTypeDouble , eScriptReturnTypeChar , eScriptReturnTypeCharStrOrNone , eScriptReturnTypeOpaqueObject } |
| Public Types inherited from lldb_private::IOHandlerDelegate | |
| enum class | Completion { None , LLDBCommand , Expression } |
| Protected Attributes inherited from lldb_private::ScriptInterpreter | |
| Debugger & | m_debugger |
| lldb::ScriptLanguage | m_script_lang |
| Protected Attributes inherited from lldb_private::IOHandlerDelegateMultiline | |
| const std::string | m_end_line |
| Protected Attributes inherited from lldb_private::IOHandlerDelegate | |
| Completion | m_completion |
Abstract interface for the Python script interpreter.
Definition at line 25 of file ScriptInterpreterPython.h.
|
inline |
Definition at line 41 of file ScriptInterpreterPython.h.
References lldb_private::IOHandlerDelegateMultiline::IOHandlerDelegateMultiline(), and lldb_private::ScriptInterpreter::ScriptInterpreter().
Referenced by lldb_private::ScriptInterpreterPythonImpl::ScriptInterpreterPythonImpl().
|
staticprotected |
Definition at line 206 of file ScriptInterpreterPython.cpp.
Referenced by ComputePythonDirForApple(), and GetPythonDir().
|
staticprotected |
Definition at line 190 of file ScriptInterpreterPython.cpp.
References ComputePythonDir().
Referenced by GetPythonDir().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 270 of file ScriptInterpreterPython.cpp.
References lldb::eScriptedExtensionInvalid, lldb::eScriptedExtensionOperatingSystem, lldb::eScriptedExtensionParsedCommand, lldb::eScriptedExtensionScriptedBreakpointResolver, lldb::eScriptedExtensionScriptedCommand, lldb::eScriptedExtensionScriptedFrame, lldb::eScriptedExtensionScriptedFrameProvider, lldb::eScriptedExtensionScriptedHook, lldb::eScriptedExtensionScriptedPlatform, lldb::eScriptedExtensionScriptedProcess, lldb::eScriptedExtensionScriptedStackFrameRecognizer, lldb::eScriptedExtensionScriptedStringSummary, lldb::eScriptedExtensionScriptedThread, and lldb::eScriptedExtensionScriptedThreadPlan.
Referenced by GetExtensionSchema().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 560 of file ScriptInterpreterPython.cpp.
References lldb_private::FileSpec::AppendPathComponent(), lldb_private::File::eOpenOptionCanCreate, lldb_private::File::eOpenOptionTruncate, lldb_private::File::eOpenOptionWriteOnly, error(), lldb_private::Stream::Format(), lldb_private::StreamString::GetData(), lldb_private::StreamString::GetSize(), lldb_private::StreamString::GetString(), lldb_private::FileSystem::Instance(), lldb_private::FileSystem::Open(), ParseExtensionSchema(), lldb_private::Stream::PutCString(), and lldb_private::FileSystem::Resolve().
|
protected |
Definition at line 304 of file ScriptInterpreterPython.cpp.
References lldb_private::ScriptInterpreter::eScriptReturnTypeOpaqueObject, lldb_private::ScriptInterpreter::ExecuteOneLineWithReturn(), ExtensionToImportPath(), lldb_private::ScriptInterpreter::ExtensionToString(), lldb_private::python::PythonObject::get(), lldb_private::StreamString::GetData(), lldb_private::python::PythonString::GetString(), lldb_private::python::PythonObject::IsAllocated(), lldb_private::python::Owned, lldb_private::StructuredData::ParseJSON(), lldb_private::Stream::Printf(), lldb_private::python::PythonObject::Str(), and lldb_private::ScriptInterpreter::StringToExtension().
Referenced by ParseExtensionSchema().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 256 of file ScriptInterpreterPython.cpp.
References lldb_private::python::As(), GetInterpreterInfoScript, lldb_private::FileSpec::GetPath(), GetPythonDir(), python_exe_relative_path, and lldb_private::python::unwrapIgnoringErrors().
|
static |
Definition at line 659 of file ScriptInterpreterPython.cpp.
Referenced by Initialize().
|
inlinestatic |
Definition at line 56 of file ScriptInterpreterPython.h.
Referenced by lldb_private::ScriptInterpreterPythonImpl::GetPluginName(), and Initialize().
|
static |
Definition at line 221 of file ScriptInterpreterPython.cpp.
References ComputePythonDir(), ComputePythonDirForApple(), lldb_private::FileSpec::GetPath(), and lldb_private::FileSpec::SetDirectory().
Referenced by GetInterpreterInfo(), and Initialize().
|
static |
Definition at line 663 of file ScriptInterpreterPython.cpp.
References lldb_private::ScriptInterpreterPythonImpl::CreateInstance(), lldb::eScriptLanguagePython, GetPluginDescriptionStatic(), GetPluginNameStatic(), GetPythonDir(), lldb_private::ScriptInterpreterPythonImpl::Initialize(), lldb_private::ScriptInterpreterPythonInterfaces::Initialize(), lldb_private::PluginManager::RegisterPlugin(), and SharedLibraryDirectoryHelper().
|
protected |
Definition at line 358 of file ScriptInterpreterPython.cpp.
References lldb_private::Stream::EOL(), lldb_private::StructuredData::Array::ForEach(), lldb_private::StructuredData::Object::GetAsString(), GetExtensionSchema(), lldb_private::StructuredData::Array::GetItemAtIndexAsDictionary(), lldb_private::StructuredData::Array::GetSize(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsArray(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsBoolean(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsString(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), lldb_private::Stream::Printf(), and lldb_private::Stream::PutCString().
Referenced by GenerateExtensionTemplate().
|
static |
Definition at line 632 of file ScriptInterpreterPython.cpp.
References lldb_private::FileSpec::AppendPathComponent(), lldb_private::FileSpec::GetFileNameExtension(), lldb_private::FileSystem::Instance(), lldb_private::FileSpec::RemoveLastPathComponent(), and lldb_private::FileSystem::ResolveSymbolicLink().
Referenced by Initialize().
|
static |
Definition at line 686 of file ScriptInterpreterPython.cpp.
References lldb_private::ScriptInterpreterPythonImpl::CreateInstance(), lldb_private::ScriptInterpreterPythonInterfaces::Terminate(), and lldb_private::PluginManager::UnregisterPlugin().