LLDB  mainline
Classes | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | List of all members
lldb_private::ScriptInterpreterPython Class Reference

Abstract interface for the Python script interpreter. More...

#include <ScriptInterpreterPython.h>

Inheritance diagram for lldb_private::ScriptInterpreterPython:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::ScriptInterpreterPython:
Collaboration graph
[legend]

Classes

class  CommandDataPython
 

Public Member Functions

 ScriptInterpreterPython (Debugger &debugger)
 
- Public Member Functions inherited from lldb_private::ScriptInterpreter
 ScriptInterpreter (Debugger &debugger, lldb::ScriptLanguage script_lang)
 
 ~ScriptInterpreter () override
 
virtual bool Interrupt ()
 
virtual bool ExecuteOneLine (llvm::StringRef command, CommandReturnObject *result, const ExecuteScriptOptions &options=ExecuteScriptOptions())=0
 
virtual void ExecuteInterpreterLoop ()=0
 
virtual bool ExecuteOneLineWithReturn (llvm::StringRef in_string, ScriptReturnType return_type, void *ret_value, const ExecuteScriptOptions &options=ExecuteScriptOptions())
 
virtual Status ExecuteMultipleLines (const char *in_string, const ExecuteScriptOptions &options=ExecuteScriptOptions())
 
virtual Status ExportFunctionDefinitionToInterpreter (StringList &function_def)
 
virtual Status GenerateBreakpointCommandCallbackData (StringList &input, std::string &output)
 
virtual bool GenerateWatchpointCommandCallbackData (StringList &input, std::string &output)
 
virtual bool GenerateTypeScriptFunction (const char *oneliner, std::string &output, const void *name_token=nullptr)
 
virtual bool GenerateTypeScriptFunction (StringList &input, std::string &output, const void *name_token=nullptr)
 
virtual bool GenerateScriptAliasFunction (StringList &input, std::string &output)
 
virtual bool GenerateTypeSynthClass (StringList &input, std::string &output, const void *name_token=nullptr)
 
virtual bool GenerateTypeSynthClass (const char *oneliner, std::string &output, const void *name_token=nullptr)
 
virtual StructuredData::ObjectSP CreateSyntheticScriptedProvider (const char *class_name, lldb::ValueObjectSP valobj)
 
virtual StructuredData::GenericSP CreateScriptCommandObject (const char *class_name)
 
virtual StructuredData::GenericSP CreateFrameRecognizer (const char *class_name)
 
virtual lldb::ValueObjectListSP GetRecognizedArguments (const StructuredData::ObjectSP &implementor, lldb::StackFrameSP frame_sp)
 
virtual StructuredData::GenericSP OSPlugin_CreatePluginObject (const char *class_name, lldb::ProcessSP process_sp)
 
virtual StructuredData::DictionarySP OSPlugin_RegisterInfo (StructuredData::ObjectSP os_plugin_object_sp)
 
virtual StructuredData::ArraySP OSPlugin_ThreadsInfo (StructuredData::ObjectSP os_plugin_object_sp)
 
virtual StructuredData::StringSP OSPlugin_RegisterContextData (StructuredData::ObjectSP os_plugin_object_sp, lldb::tid_t thread_id)
 
virtual StructuredData::DictionarySP OSPlugin_CreateThread (StructuredData::ObjectSP os_plugin_object_sp, lldb::tid_t tid, lldb::addr_t context)
 
virtual StructuredData::ObjectSP CreateScriptedThreadPlan (const char *class_name, lldb::ThreadPlanSP thread_plan_sp)
 
virtual bool ScriptedThreadPlanExplainsStop (StructuredData::ObjectSP implementor_sp, Event *event, bool &script_error)
 
virtual bool ScriptedThreadPlanShouldStop (StructuredData::ObjectSP implementor_sp, Event *event, bool &script_error)
 
virtual bool ScriptedThreadPlanIsStale (StructuredData::ObjectSP implementor_sp, bool &script_error)
 
virtual lldb::StateType ScriptedThreadPlanGetRunState (StructuredData::ObjectSP implementor_sp, bool &script_error)
 
virtual StructuredData::GenericSP CreateScriptedBreakpointResolver (const char *class_name, StructuredDataImpl *args_data, lldb::BreakpointSP &bkpt_sp)
 
virtual bool ScriptedBreakpointResolverSearchCallback (StructuredData::GenericSP implementor_sp, SymbolContext *sym_ctx)
 
virtual lldb::SearchDepth ScriptedBreakpointResolverSearchDepth (StructuredData::GenericSP implementor_sp)
 
virtual StructuredData::ObjectSP LoadPluginModule (const FileSpec &file_spec, lldb_private::Status &error)
 
virtual StructuredData::DictionarySP GetDynamicSettings (StructuredData::ObjectSP plugin_module_sp, Target *target, const char *setting_name, lldb_private::Status &error)
 
virtual Status GenerateFunction (const char *signature, const StringList &input)
 
virtual void CollectDataForBreakpointCommandCallback (std::vector< BreakpointOptions *> &options, CommandReturnObject &result)
 
virtual void CollectDataForWatchpointCommandCallback (WatchpointOptions *wp_options, CommandReturnObject &result)
 
Status SetBreakpointCommandCallback (std::vector< BreakpointOptions *> &bp_options_vec, const char *callback_text)
 Set the specified text as the callback for the breakpoint. More...
 
virtual Status SetBreakpointCommandCallback (BreakpointOptions *bp_options, const char *callback_text)
 
virtual Status SetBreakpointCommandCallback (BreakpointOptions *bp_options, std::unique_ptr< BreakpointOptions::CommandData > &data_up)
 This one is for deserialization: More...
 
void SetBreakpointCommandCallbackFunction (std::vector< BreakpointOptions *> &bp_options_vec, const char *function_name)
 
virtual void SetBreakpointCommandCallbackFunction (BreakpointOptions *bp_options, const char *function_name)
 Set a one-liner as the callback for the breakpoint. More...
 
virtual void SetWatchpointCommandCallback (WatchpointOptions *wp_options, const char *oneliner)
 Set a one-liner as the callback for the watchpoint. More...
 
virtual bool GetScriptedSummary (const char *function_name, lldb::ValueObjectSP valobj, StructuredData::ObjectSP &callee_wrapper_sp, const TypeSummaryOptions &options, std::string &retval)
 
virtual void Clear ()
 
virtual size_t CalculateNumChildren (const StructuredData::ObjectSP &implementor, uint32_t max)
 
virtual lldb::ValueObjectSP GetChildAtIndex (const StructuredData::ObjectSP &implementor, uint32_t idx)
 
virtual int GetIndexOfChildWithName (const StructuredData::ObjectSP &implementor, const char *child_name)
 
virtual bool UpdateSynthProviderInstance (const StructuredData::ObjectSP &implementor)
 
virtual bool MightHaveChildrenSynthProviderInstance (const StructuredData::ObjectSP &implementor)
 
virtual lldb::ValueObjectSP GetSyntheticValue (const StructuredData::ObjectSP &implementor)
 
virtual ConstString GetSyntheticTypeName (const StructuredData::ObjectSP &implementor)
 
virtual bool RunScriptBasedCommand (const char *impl_function, llvm::StringRef args, ScriptedCommandSynchronicity synchronicity, lldb_private::CommandReturnObject &cmd_retobj, Status &error, const lldb_private::ExecutionContext &exe_ctx)
 
virtual bool RunScriptBasedCommand (StructuredData::GenericSP impl_obj_sp, llvm::StringRef args, ScriptedCommandSynchronicity synchronicity, lldb_private::CommandReturnObject &cmd_retobj, Status &error, const lldb_private::ExecutionContext &exe_ctx)
 
virtual bool RunScriptFormatKeyword (const char *impl_function, Process *process, std::string &output, Status &error)
 
virtual bool RunScriptFormatKeyword (const char *impl_function, Thread *thread, std::string &output, Status &error)
 
virtual bool RunScriptFormatKeyword (const char *impl_function, Target *target, std::string &output, Status &error)
 
virtual bool RunScriptFormatKeyword (const char *impl_function, StackFrame *frame, std::string &output, Status &error)
 
virtual bool RunScriptFormatKeyword (const char *impl_function, ValueObject *value, std::string &output, Status &error)
 
virtual bool GetDocumentationForItem (const char *item, std::string &dest)
 
virtual bool GetShortHelpForCommandObject (StructuredData::GenericSP cmd_obj_sp, std::string &dest)
 
virtual uint32_t GetFlagsForCommandObject (StructuredData::GenericSP cmd_obj_sp)
 
virtual bool GetLongHelpForCommandObject (StructuredData::GenericSP cmd_obj_sp, std::string &dest)
 
virtual bool CheckObjectExists (const char *name)
 
virtual bool LoadScriptingModule (const char *filename, bool can_reload, bool init_session, lldb_private::Status &error, StructuredData::ObjectSP *module_sp=nullptr)
 
virtual bool IsReservedWord (const char *word)
 
virtual std::unique_ptr< ScriptInterpreterLockerAcquireInterpreterLock ()
 
const char * GetScriptInterpreterPtyName ()
 
int GetMasterFileDescriptor ()
 
virtual void ResetOutputFileHandle (FILE *new_fh)
 
lldb::ScriptLanguage GetLanguage ()
 
- Public Member Functions inherited from lldb_private::PluginInterface
virtual ~PluginInterface ()
 
virtual ConstString GetPluginName ()=0
 
virtual uint32_t GetPluginVersion ()=0
 
- Public Member Functions inherited from lldb_private::IOHandlerDelegateMultiline
 IOHandlerDelegateMultiline (const char *end_line, Completion completion=Completion::None)
 
 ~IOHandlerDelegateMultiline () override=default
 
ConstString 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. More...
 
- Public Member Functions inherited from lldb_private::IOHandlerDelegate
 IOHandlerDelegate (Completion completion=Completion::None)
 
virtual ~IOHandlerDelegate ()=default
 
virtual void IOHandlerActivated (IOHandler &io_handler, bool interactive)
 
virtual void IOHandlerDeactivated (IOHandler &io_handler)
 
virtual int IOHandlerComplete (IOHandler &io_handler, const char *current_line, const char *cursor, const char *last_char, int skip_first_n_matches, int max_matches, StringList &matches, StringList &descriptions)
 
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. More...
 
virtual void IOHandlerInputComplete (IOHandler &io_handler, std::string &data)=0
 Called when a line or lines have been retrieved. More...
 
virtual void IOHandlerInputInterrupted (IOHandler &io_handler, std::string &data)
 
virtual const char * IOHandlerGetCommandPrefix ()
 
virtual const char * IOHandlerGetHelpPrologue ()
 
virtual bool IOHandlerInterrupt (IOHandler &io_handler)
 

Static Public Member Functions

static void Initialize ()
 
static void Terminate ()
 
static lldb_private::ConstString GetPluginNameStatic ()
 
static const char * GetPluginDescriptionStatic ()
 
static FileSpec GetPythonDir ()
 
- 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 Protected Member Functions

static void ComputePythonDirForApple (llvm::SmallVectorImpl< char > &path)
 
static void ComputePythonDirForPosix (llvm::SmallVectorImpl< char > &path)
 
static void ComputePythonDirForWindows (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  Completion { Completion::None, Completion::LLDBCommand, Completion::Expression }
 
- Protected Attributes inherited from lldb_private::ScriptInterpreter
Debuggerm_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
 

Detailed Description

Abstract interface for the Python script interpreter.

Definition at line 29 of file ScriptInterpreterPython.h.

Constructor & Destructor Documentation

◆ ScriptInterpreterPython()

lldb_private::ScriptInterpreterPython::ScriptInterpreterPython ( Debugger debugger)
inline

Member Function Documentation

◆ ComputePythonDirForApple()

void ScriptInterpreterPython::ComputePythonDirForApple ( llvm::SmallVectorImpl< char > &  path)
staticprotected

Definition at line 296 of file ScriptInterpreterPython.cpp.

Referenced by ScriptInterpreterPython().

◆ ComputePythonDirForPosix()

void ScriptInterpreterPython::ComputePythonDirForPosix ( llvm::SmallVectorImpl< char > &  path)
staticprotected

Definition at line 312 of file ScriptInterpreterPython.cpp.

Referenced by ScriptInterpreterPython().

◆ ComputePythonDirForWindows()

void ScriptInterpreterPython::ComputePythonDirForWindows ( llvm::SmallVectorImpl< char > &  path)
staticprotected

Definition at line 329 of file ScriptInterpreterPython.cpp.

Referenced by ScriptInterpreterPython().

◆ GetPluginDescriptionStatic()

const char * ScriptInterpreterPython::GetPluginDescriptionStatic ( )
static

Definition at line 366 of file ScriptInterpreterPython.cpp.

Referenced by ScriptInterpreterPython().

◆ GetPluginNameStatic()

lldb_private::ConstString ScriptInterpreterPython::GetPluginNameStatic ( )
static

◆ GetPythonDir()

FileSpec ScriptInterpreterPython::GetPythonDir ( )
static

◆ Initialize()

void ScriptInterpreterPython::Initialize ( )
static

◆ Terminate()

void ScriptInterpreterPython::Terminate ( )
static

Definition at line 381 of file ScriptInterpreterPython.cpp.

Referenced by ScriptInterpreterPython().


The documentation for this class was generated from the following files: