|
LLDB mainline
|
#include <ScriptInterpreterPythonImpl.h>
Classes | |
| class | Locker |
| class | SessionIORedirect |
| A Python sys.stdout/stderr file backed by a pipe whose read end is drained by a reader thread that writes to the debugger's terminal under the output lock (Debugger::PrintAsync). More... | |
| class | SynchronicityHandler |
Public Types | |
| enum class | AddLocation { Beginning , End } |
| enum | ActiveIOHandler { eIOHandlerNone , eIOHandlerBreakpoint , eIOHandlerWatchpoint } |
| 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 } |
Public Member Functions | |
| ScriptInterpreterPythonImpl (Debugger &debugger) | |
| ~ScriptInterpreterPythonImpl () override | |
| bool | Interrupt () override |
| bool | ExecuteOneLine (llvm::StringRef command, CommandReturnObject *result, const ExecuteScriptOptions &options=ExecuteScriptOptions()) override |
| llvm::Error | ExecuteInterpreterLoop () override |
| bool | ExecuteOneLineWithReturn (llvm::StringRef in_string, ScriptInterpreter::ScriptReturnType return_type, void *ret_value, const ExecuteScriptOptions &options=ExecuteScriptOptions()) override |
| lldb_private::Status | ExecuteMultipleLines (const char *in_string, const ExecuteScriptOptions &options=ExecuteScriptOptions()) override |
| Status | ExportFunctionDefinitionToInterpreter (StringList &function_def) override |
| bool | GenerateTypeScriptFunction (StringList &input, std::string &output, const void *name_token=nullptr) override |
| bool | GenerateTypeSynthClass (StringList &input, std::string &output, const void *name_token=nullptr) override |
| bool | GenerateTypeSynthClass (const char *oneliner, std::string &output, const void *name_token=nullptr) override |
| bool | GenerateTypeScriptFunction (const char *oneliner, std::string &output, const void *name_token=nullptr) override |
| bool | GenerateScriptAliasFunction (StringList &input, std::string &output) override |
| StructuredData::ObjectSP | CreateStructuredDataFromScriptObject (ScriptObject obj) override |
| lldb::ScriptedProcessInterfaceUP | CreateScriptedProcessInterface () override |
| lldb::ScriptedHookInterfaceSP | CreateScriptedHookInterface () override |
| lldb::ScriptedBreakpointInterfaceSP | CreateScriptedBreakpointInterface () override |
| lldb::ScriptedStackFrameRecognizerInterfaceSP | CreateScriptedStackFrameRecognizerInterface () override |
| lldb::ScriptedCommandInterfaceSP | CreateScriptedCommandInterface () override |
| lldb::ScriptedStringSummaryInterfaceSP | CreateScriptedStringSummaryInterface () override |
| lldb::ScriptedSyntheticChildrenInterfaceSP | CreateScriptedSyntheticChildrenInterface () override |
| lldb::ScriptedThreadInterfaceSP | CreateScriptedThreadInterface () override |
| lldb::ScriptedFrameInterfaceSP | CreateScriptedFrameInterface () override |
| lldb::ScriptedFrameProviderInterfaceSP | CreateScriptedFrameProviderInterface () override |
| lldb::ScriptedThreadPlanInterfaceSP | CreateScriptedThreadPlanInterface () override |
| lldb::OperatingSystemInterfaceSP | CreateOperatingSystemInterface () override |
| StructuredData::ObjectSP | LoadPluginModule (const FileSpec &file_spec, lldb_private::Status &error) override |
| StructuredData::DictionarySP | GetDynamicSettings (StructuredData::ObjectSP plugin_module_sp, Target *target, const char *setting_name, lldb_private::Status &error) override |
| bool | RunScriptBasedCommand (const char *impl_function, llvm::StringRef args, ScriptedCommandSynchronicity synchronicity, lldb_private::CommandReturnObject &cmd_retobj, Status &error, const lldb_private::ExecutionContext &exe_ctx) override |
| Status | GenerateFunction (const char *signature, const StringList &input, bool is_callback) override |
| Status | GenerateBreakpointCommandCallbackData (StringList &input, std::string &output, bool has_extra_args, bool is_callback) override |
| bool | GenerateWatchpointCommandCallbackData (StringList &input, std::string &output, bool is_callback) override |
| bool | GetScriptedSummary (const char *function_name, lldb::ValueObjectSP valobj, StructuredData::ObjectSP &callee_wrapper_sp, const TypeSummaryOptions &options, std::string &retval) override |
| bool | FormatterCallbackFunction (const char *function_name, lldb::TypeImplSP type_impl_sp) override |
| bool | GetDocumentationForItem (const char *item, std::string &dest) override |
| In Python, a special attribute doc contains the docstring for an object (function, method, class, ...) if any is defined Otherwise, the attribute's value is None. | |
| bool | CheckObjectExists (const char *name) override |
| bool | RunScriptFormatKeyword (const char *impl_function, Process *process, std::string &output, Status &error) override |
| bool | RunScriptFormatKeyword (const char *impl_function, Thread *thread, std::string &output, Status &error) override |
| bool | RunScriptFormatKeyword (const char *impl_function, Target *target, std::string &output, Status &error) override |
| bool | RunScriptFormatKeyword (const char *impl_function, StackFrame *frame, std::string &output, Status &error) override |
| bool | RunScriptFormatKeyword (const char *impl_function, ValueObject *value, std::string &output, Status &error) override |
| bool | LoadScriptingModule (const char *filename, const LoadScriptOptions &options, lldb_private::Status &error, StructuredData::ObjectSP *module_sp=nullptr, FileSpec extra_search_dir={}, lldb::TargetSP loaded_into_target_sp={}) override |
| bool | IsReservedWord (const char *word) override |
| std::unique_ptr< ScriptInterpreterLocker > | AcquireInterpreterLock () override |
| void | CollectDataForBreakpointCommandCallback (std::vector< std::reference_wrapper< BreakpointOptions > > &bp_options_vec, CommandReturnObject &result) override |
| void | CollectDataForWatchpointCommandCallback (WatchpointOptions *wp_options, CommandReturnObject &result) override |
| llvm::Error | SetBreakpointCommandCallback (BreakpointOptions &bp_options, const char *callback_body, bool is_callback) override |
| Set the callback body text into the callback for the breakpoint. | |
| llvm::Error | SetBreakpointCommandCallbackFunction (BreakpointOptions &bp_options, const char *function_name, StructuredData::ObjectSP extra_args_sp) override |
| Set a script function as the callback for the breakpoint. | |
| llvm::Error | SetBreakpointCommandCallback (BreakpointOptions &bp_options, std::unique_ptr< BreakpointOptions::CommandData > &data_up) override |
| This one is for deserialization: | |
| llvm::Error | SetBreakpointCommandCallback (BreakpointOptions &bp_options, const char *command_body_text, StructuredData::ObjectSP extra_args_sp, bool uses_extra_args, bool is_callback) |
| llvm::Error | SetWatchpointCommandCallback (WatchpointOptions *wp_options, const char *user_input, bool is_callback) override |
| Set a one-liner as the callback for the watchpoint. | |
| const char * | GetDictionaryName () |
| PyThreadState * | GetThreadState () |
| void | SetThreadState (PyThreadState *s) |
| void | IOHandlerActivated (IOHandler &io_handler, bool interactive) override |
| void | IOHandlerInputComplete (IOHandler &io_handler, std::string &data) override |
| Called when a line or lines have been retrieved. | |
| llvm::StringRef | GetPluginName () override |
| bool | EnterSession (uint16_t on_entry_flags, lldb::FileSP in, lldb::FileSP out, lldb::FileSP err) |
| void | LeaveSession () |
| uint32_t | IsExecutingPython () |
| uint32_t | IncrementLockCount () |
| uint32_t | DecrementLockCount () |
| python::PythonModule & | GetMainModule () |
| python::PythonDictionary & | GetSessionDictionary () |
| python::PythonDictionary & | GetSysModuleDictionary () |
| llvm::Expected< unsigned > | GetMaxPositionalArgumentsForCallable (const llvm::StringRef &callable_name) override |
| bool | GetEmbeddedInterpreterModuleObjects () |
| bool | SetStdHandle (lldb::FileSP file, const char *py_name, python::PythonObject &save_file, const char *mode, bool serialize_terminal_output) |
| Point sys. | |
| bool | RedirectTerminalHandleThroughLock (const char *py_name, python::PythonObject &save_file, const char *mode, File &file) |
If file is the debugger's own terminal, point sys. | |
| Public Member Functions inherited from lldb_private::ScriptInterpreterPython | |
| ScriptInterpreterPython (Debugger &debugger) | |
| llvm::Expected< std::string > | ExtensionToImportPath (lldb::ScriptedExtension extension) override |
| StructuredData::DictionarySP | GetInterpreterInfo () override |
| llvm::Expected< FileSpec > | GenerateExtensionTemplate (const std::string &name, std::vector< ExtensionTemplateRequest > &extensions, bool generate_non_abstract_methods, std::string output_file) override |
| Public Member Functions inherited from lldb_private::ScriptInterpreter | |
| ScriptInterpreter (Debugger &debugger, lldb::ScriptLanguage script_lang) | |
| ~ScriptInterpreter () override=default | |
| llvm::Error | SetBreakpointCommandCallback (std::vector< std::reference_wrapper< BreakpointOptions > > &bp_options_vec, const char *callback_text) |
| Set the specified text as the callback for the breakpoint. | |
| llvm::Error | SetBreakpointCommandCallbackFunction (std::vector< std::reference_wrapper< BreakpointOptions > > &bp_options_vec, const char *function_name, StructuredData::ObjectSP extra_args_sp) |
| virtual void | Clear () |
| const lldb::ScriptedInstanceRegistrySP & | GetScriptedInstanceRegistry () const |
| const char * | GetScriptInterpreterPtyName () |
| lldb::ScriptLanguage | GetLanguage () |
| virtual lldb::ScriptedPlatformInterfaceUP | GetScriptedPlatformInterface () |
| virtual SanitizedScriptingModuleName | GetSanitizedScriptingModuleName (llvm::StringRef name) |
| Debugger & | GetDebugger () |
| Get the debugger associated with this script interpreter. | |
| const Debugger & | GetDebugger () const |
| Public Member Functions inherited from lldb_private::PluginInterface | |
| PluginInterface ()=default | |
| virtual | ~PluginInterface ()=default |
| PluginInterface (const PluginInterface &)=delete | |
| PluginInterface & | operator= (const PluginInterface &)=delete |
| Public Member Functions inherited from lldb_private::IOHandlerDelegateMultiline | |
| IOHandlerDelegateMultiline (llvm::StringRef end_line, Completion completion=Completion::None) | |
| ~IOHandlerDelegateMultiline () override=default | |
| llvm::StringRef | IOHandlerGetControlSequence (char ch) override |
| bool | IOHandlerIsInputComplete (IOHandler &io_handler, StringList &lines) override |
| Called to determine whether typing enter after the last line in lines should end input. | |
| Public Member Functions inherited from lldb_private::IOHandlerDelegate | |
| IOHandlerDelegate (Completion completion=Completion::None) | |
| virtual | ~IOHandlerDelegate ()=default |
| virtual void | IOHandlerDeactivated (IOHandler &io_handler) |
| virtual std::optional< std::string > | IOHandlerSuggestion (IOHandler &io_handler, llvm::StringRef line) |
| virtual void | IOHandlerComplete (IOHandler &io_handler, CompletionRequest &request) |
| virtual const char * | IOHandlerGetFixIndentationCharacters () |
| virtual int | IOHandlerFixIndentation (IOHandler &io_handler, const StringList &lines, int cursor_position) |
| Called when a new line is created or one of an identified set of indentation characters is typed. | |
| virtual void | IOHandlerInputInterrupted (IOHandler &io_handler, std::string &data) |
| virtual const char * | IOHandlerGetCommandPrefix () |
| virtual const char * | IOHandlerGetHelpPrologue () |
| virtual bool | IOHandlerInterrupt (IOHandler &io_handler) |
Public Attributes | |
| python::PythonObject | m_saved_stdin |
| python::PythonObject | m_saved_stdout |
| python::PythonObject | m_saved_stderr |
| std::unique_ptr< SessionIORedirect > | m_stdout_redirect |
| std::unique_ptr< SessionIORedirect > | m_stderr_redirect |
| python::PythonModule | m_main_module |
| python::PythonDictionary | m_session_dict |
| python::PythonDictionary | m_sys_module_dict |
| python::PythonObject | m_run_one_line_function |
| python::PythonObject | m_run_one_line_str_global |
| std::string | m_dictionary_name |
| ActiveIOHandler | m_active_io_handler |
| bool | m_session_is_active |
| bool | m_pty_secondary_is_open |
| bool | m_valid_session |
| uint32_t | m_lock_count |
| std::mutex | m_mutex |
| PyThreadState * | m_command_thread_state |
Friends | |
| class | IOHandlerPythonInterpreter |
Additional Inherited Members | |
| Protected Member Functions inherited from lldb_private::ScriptInterpreterPython | |
| 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 inherited from lldb_private::ScriptInterpreterPython | |
| static void | ComputePythonDirForApple (llvm::SmallVectorImpl< char > &path) |
| static void | ComputePythonDir (llvm::SmallVectorImpl< char > &path) |
| 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 |
Definition at line 25 of file ScriptInterpreterPythonImpl.h.
| Enumerator | |
|---|---|
| eIOHandlerNone | |
| eIOHandlerBreakpoint | |
| eIOHandlerWatchpoint | |
Definition at line 318 of file ScriptInterpreterPythonImpl.h.
|
strong |
| Enumerator | |
|---|---|
| Beginning | |
| End | |
Definition at line 292 of file ScriptInterpreterPythonImpl.h.
| ScriptInterpreterPythonImpl::ScriptInterpreterPythonImpl | ( | Debugger & | debugger | ) |
Definition at line 801 of file ScriptInterpreterPython.cpp.
References lldb_private::ScriptInterpreterPythonImpl::Locker::AcquireLock, lldb_private::StreamString::Clear(), eIOHandlerNone, lldb_private::ScriptInterpreterPythonImpl::Locker::FreeAcquiredLock, lldb_private::StreamString::GetData(), lldb_private::Invalid, m_active_io_handler, m_command_thread_state, lldb_private::ScriptInterpreter::m_debugger, m_dictionary_name, m_lock_count, m_main_module, m_pty_secondary_is_open, m_run_one_line_function, m_run_one_line_str_global, m_saved_stderr, m_saved_stdin, m_saved_stdout, m_session_dict, m_session_is_active, m_sys_module_dict, m_valid_session, lldb_private::Stream::Printf(), lldb_private::python::RunSimpleString(), and lldb_private::ScriptInterpreterPython::ScriptInterpreterPython().
Referenced by lldb_private::ScriptInterpreterPythonImpl::Locker::Locker().
|
override |
Definition at line 939 of file ScriptInterpreterPython.cpp.
References m_session_dict.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2830 of file ScriptInterpreterPython.cpp.
|
static |
Definition at line 2891 of file ScriptInterpreterPython.cpp.
|
static |
Definition at line 2273 of file ScriptInterpreterPython.cpp.
References lldb_private::ScriptInterpreterPythonImpl::Locker::AcquireLock, lldb_private::ScriptInterpreterPythonImpl::Locker::InitSession, m_dictionary_name, and lldb_private::ScriptInterpreterPythonImpl::Locker::NoSTDIN.
Referenced by SetBreakpointCommandCallback(), and SetWatchpointCommandCallback().
|
inlineoverridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 140 of file ScriptInterpreterPythonImpl.h.
References GetDocumentationForItem().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1719 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1727 of file ScriptInterpreterPython.cpp.
References eIOHandlerBreakpoint, m_active_io_handler, and lldb_private::ScriptInterpreter::m_debugger.
|
static |
Definition at line 1036 of file ScriptInterpreterPython.cpp.
Referenced by lldb_private::ScriptInterpreterPython::Initialize(), and lldb_private::ScriptInterpreterPython::Terminate().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2086 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2041 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2051 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2071 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2076 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2036 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2031 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2046 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2056 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2061 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2066 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2081 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2091 of file ScriptInterpreterPython.cpp.
|
inline |
Definition at line 311 of file ScriptInterpreterPythonImpl.h.
References m_lock_count, and m_mutex.
| bool ScriptInterpreterPythonImpl::EnterSession | ( | uint16_t | on_entry_flags, |
| lldb::FileSP | in, | ||
| lldb::FileSP | out, | ||
| lldb::FileSP | err ) |
Definition at line 1195 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Implements lldb_private::ScriptInterpreter.
Definition at line 1482 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1668 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Implements lldb_private::ScriptInterpreter.
Definition at line 1390 of file ScriptInterpreterPython.cpp.
References m_run_one_line_function, and m_run_one_line_str_global.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1544 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1839 of file ScriptInterpreterPython.cpp.
References WatchpointCallbackFunction().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2265 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2162 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1851 of file ScriptInterpreterPython.cpp.
References error().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1961 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2148 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1933 of file ScriptInterpreterPython.cpp.
References error().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2155 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1986 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2192 of file ScriptInterpreterPython.cpp.
References error().
|
inline |
Definition at line 206 of file ScriptInterpreterPythonImpl.h.
References m_dictionary_name.
|
overridevirtual |
In Python, a special attribute doc contains the docstring for an object (function, method, class, ...) if any is defined Otherwise, the attribute's value is None.
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2799 of file ScriptInterpreterPython.cpp.
Referenced by CheckObjectExists().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2120 of file ScriptInterpreterPython.cpp.
| bool ScriptInterpreterPythonImpl::GetEmbeddedInterpreterModuleObjects | ( | ) |
Definition at line 1369 of file ScriptInterpreterPython.cpp.
| PythonModule & ScriptInterpreterPythonImpl::GetMainModule | ( | ) |
Definition at line 1289 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1322 of file ScriptInterpreterPython.cpp.
References m_sys_module_dict.
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 225 of file ScriptInterpreterPythonImpl.h.
References lldb_private::ScriptInterpreterPython::GetPluginNameStatic().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2214 of file ScriptInterpreterPython.cpp.
| PythonDictionary & ScriptInterpreterPythonImpl::GetSessionDictionary | ( | ) |
Definition at line 1295 of file ScriptInterpreterPython.cpp.
References lldb_private::python::PythonModule::Import(), and m_main_module.
| PythonDictionary & ScriptInterpreterPythonImpl::GetSysModuleDictionary | ( | ) |
Definition at line 1313 of file ScriptInterpreterPython.cpp.
References lldb_private::python::As(), m_dictionary_name, and m_session_dict.
|
inline |
Definition at line 208 of file ScriptInterpreterPythonImpl.h.
References m_command_thread_state.
|
inline |
Definition at line 306 of file ScriptInterpreterPythonImpl.h.
References m_lock_count, and m_mutex.
|
static |
Definition at line 2837 of file ScriptInterpreterPython.cpp.
References lldb_private::ScriptInterpreterPythonImpl::Locker::AcquireLock, lldb_private::ScriptInterpreterPythonImpl::Locker::FreeLock, lldb_private::ScriptInterpreterPythonImpl::Locker::InitSession, lldb_private::ScriptInterpreterPythonImpl::Locker::NoSTDIN, and lldb_private::ScriptInterpreterPythonImpl::Locker::TearDownSession.
Referenced by lldb_private::ScriptInterpreterPython::Initialize().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1503 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::IOHandlerDelegate.
Definition at line 950 of file ScriptInterpreterPython.cpp.
References eIOHandlerBreakpoint, eIOHandlerNone, eIOHandlerWatchpoint, lldb_private::IOHandler::GetOutputStreamFileSP(), m_active_io_handler, and lldb_private::Stream::PutCString().
|
overridevirtual |
Called when a line or lines have been retrieved.
This function can handle the current line and possibly call IOHandler::SetIsDone(true) when the IO handler is done like when "quit" is entered as a command, of when an empty line is received. It is up to the delegate to determine when a line should cause a IOHandler to exit.
Implements lldb_private::IOHandlerDelegate.
Definition at line 974 of file ScriptInterpreterPython.cpp.
|
inline |
Definition at line 301 of file ScriptInterpreterPythonImpl.h.
References m_lock_count, and m_mutex.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2710 of file ScriptInterpreterPython.cpp.
References m_dictionary_name.
| void ScriptInterpreterPythonImpl::LeaveSession | ( | ) |
Definition at line 1041 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2102 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2520 of file ScriptInterpreterPython.cpp.
| bool ScriptInterpreterPythonImpl::RedirectTerminalHandleThroughLock | ( | const char * | py_name, |
| python::PythonObject & | save_file, | ||
| const char * | mode, | ||
| File & | file ) |
If file is the debugger's own terminal, point sys.
py_name at a pipe-backed file whose writes are serialized through the output lock (see SessionIORedirect) and return true. Return false to let SetStdHandle wrap file normally.
Definition at line 1101 of file ScriptInterpreterPython.cpp.
References m_session_is_active, and m_stderr_redirect.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2751 of file ScriptInterpreterPython.cpp.
References lldb_private::eScriptedCommandSynchronicityCurrentValue.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2384 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2459 of file ScriptInterpreterPython.cpp.
References error().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2434 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2409 of file ScriptInterpreterPython.cpp.
References error().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 2484 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Set the callback body text into the callback for the breakpoint.
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1784 of file ScriptInterpreterPython.cpp.
References BreakpointCallbackFunction().
| llvm::Error ScriptInterpreterPythonImpl::SetBreakpointCommandCallback | ( | BreakpointOptions & | bp_options, |
| const char * | command_body_text, | ||
| StructuredData::ObjectSP | extra_args_sp, | ||
| bool | uses_extra_args, | ||
| bool | is_callback ) |
Definition at line 1792 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
This one is for deserialization:
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1768 of file ScriptInterpreterPython.cpp.
|
overridevirtual |
Set a script function as the callback for the breakpoint.
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1734 of file ScriptInterpreterPython.cpp.
References eIOHandlerWatchpoint, m_active_io_handler, and lldb_private::ScriptInterpreter::m_debugger.
| bool ScriptInterpreterPythonImpl::SetStdHandle | ( | lldb::FileSP | file, |
| const char * | py_name, | ||
| python::PythonObject & | save_file, | ||
| const char * | mode, | ||
| bool | serialize_terminal_output ) |
Point sys.
py_name at file. When serialize_terminal_output is true and file is the debugger's own terminal, the output is routed through a lock-synchronized pipe instead (see RedirectTerminalHandleThroughLock) so it cannot race the statusline redraw.
Definition at line 1157 of file ScriptInterpreterPython.cpp.
|
inline |
Definition at line 210 of file ScriptInterpreterPythonImpl.h.
References m_command_thread_state.
|
overridevirtual |
Set a one-liner as the callback for the watchpoint.
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 1816 of file ScriptInterpreterPython.cpp.
References BreakpointCallbackFunction().
|
static |
Definition at line 2338 of file ScriptInterpreterPython.cpp.
Referenced by ExportFunctionDefinitionToInterpreter().
|
friend |
Definition at line 27 of file ScriptInterpreterPythonImpl.h.
References error(), and IOHandlerPythonInterpreter.
Referenced by IOHandlerPythonInterpreter.
| ActiveIOHandler lldb_private::ScriptInterpreterPythonImpl::m_active_io_handler |
Definition at line 366 of file ScriptInterpreterPythonImpl.h.
Referenced by CollectDataForWatchpointCommandCallback(), IOHandlerActivated(), ScriptInterpreterPythonImpl(), and SetBreakpointCommandCallbackFunction().
| PyThreadState* lldb_private::ScriptInterpreterPythonImpl::m_command_thread_state |
Definition at line 372 of file ScriptInterpreterPythonImpl.h.
Referenced by GetThreadState(), ScriptInterpreterPythonImpl(), and SetThreadState().
| std::string lldb_private::ScriptInterpreterPythonImpl::m_dictionary_name |
Definition at line 365 of file ScriptInterpreterPythonImpl.h.
Referenced by BreakpointCallbackFunction(), GetDictionaryName(), GetSysModuleDictionary(), IsReservedWord(), and ScriptInterpreterPythonImpl().
| uint32_t lldb_private::ScriptInterpreterPythonImpl::m_lock_count |
Definition at line 370 of file ScriptInterpreterPythonImpl.h.
Referenced by DecrementLockCount(), IncrementLockCount(), IsExecutingPython(), and ScriptInterpreterPythonImpl().
| python::PythonModule lldb_private::ScriptInterpreterPythonImpl::m_main_module |
Definition at line 360 of file ScriptInterpreterPythonImpl.h.
Referenced by GetSessionDictionary(), and ScriptInterpreterPythonImpl().
| std::mutex lldb_private::ScriptInterpreterPythonImpl::m_mutex |
Definition at line 371 of file ScriptInterpreterPythonImpl.h.
Referenced by DecrementLockCount(), IncrementLockCount(), and IsExecutingPython().
| bool lldb_private::ScriptInterpreterPythonImpl::m_pty_secondary_is_open |
Definition at line 368 of file ScriptInterpreterPythonImpl.h.
Referenced by ScriptInterpreterPythonImpl().
| python::PythonObject lldb_private::ScriptInterpreterPythonImpl::m_run_one_line_function |
Definition at line 363 of file ScriptInterpreterPythonImpl.h.
Referenced by ExecuteOneLine(), and ScriptInterpreterPythonImpl().
| python::PythonObject lldb_private::ScriptInterpreterPythonImpl::m_run_one_line_str_global |
Definition at line 364 of file ScriptInterpreterPythonImpl.h.
Referenced by ExecuteOneLine(), and ScriptInterpreterPythonImpl().
| python::PythonObject lldb_private::ScriptInterpreterPythonImpl::m_saved_stderr |
Definition at line 357 of file ScriptInterpreterPythonImpl.h.
Referenced by ScriptInterpreterPythonImpl().
| python::PythonObject lldb_private::ScriptInterpreterPythonImpl::m_saved_stdin |
Definition at line 355 of file ScriptInterpreterPythonImpl.h.
Referenced by ScriptInterpreterPythonImpl().
| python::PythonObject lldb_private::ScriptInterpreterPythonImpl::m_saved_stdout |
Definition at line 356 of file ScriptInterpreterPythonImpl.h.
Referenced by ScriptInterpreterPythonImpl().
| python::PythonDictionary lldb_private::ScriptInterpreterPythonImpl::m_session_dict |
Definition at line 361 of file ScriptInterpreterPythonImpl.h.
Referenced by GetSysModuleDictionary(), ScriptInterpreterPythonImpl(), and ~ScriptInterpreterPythonImpl().
| bool lldb_private::ScriptInterpreterPythonImpl::m_session_is_active |
Definition at line 367 of file ScriptInterpreterPythonImpl.h.
Referenced by RedirectTerminalHandleThroughLock(), and ScriptInterpreterPythonImpl().
| std::unique_ptr<SessionIORedirect> lldb_private::ScriptInterpreterPythonImpl::m_stderr_redirect |
Definition at line 359 of file ScriptInterpreterPythonImpl.h.
Referenced by RedirectTerminalHandleThroughLock().
| std::unique_ptr<SessionIORedirect> lldb_private::ScriptInterpreterPythonImpl::m_stdout_redirect |
Definition at line 358 of file ScriptInterpreterPythonImpl.h.
| python::PythonDictionary lldb_private::ScriptInterpreterPythonImpl::m_sys_module_dict |
Definition at line 362 of file ScriptInterpreterPythonImpl.h.
Referenced by GetMaxPositionalArgumentsForCallable(), and ScriptInterpreterPythonImpl().
| bool lldb_private::ScriptInterpreterPythonImpl::m_valid_session |
Definition at line 369 of file ScriptInterpreterPythonImpl.h.
Referenced by ScriptInterpreterPythonImpl().