LLDB mainline
lldb_private::ScriptedFrameProviderPythonInterface Class Reference

#include <ScriptedFrameProviderPythonInterface.h>

Inheritance diagram for lldb_private::ScriptedFrameProviderPythonInterface:
[legend]

Public Member Functions

 ScriptedFrameProviderPythonInterface (ScriptInterpreterPythonImpl &interpreter)
bool AppliesToThread (llvm::StringRef class_name, lldb::ThreadSP thread_sp) override
llvm::Expected< StructuredData::GenericSPCreatePluginObject (llvm::StringRef class_name, lldb::StackFrameListSP input_frames, StructuredData::DictionarySP args_sp) override
llvm::SmallVector< AbstractMethodRequirementGetAbstractMethodRequirements () const override
std::string GetDescription (llvm::StringRef class_name) override
 Get a description string for the frame provider.
std::optional< uint32_t > GetPriority (llvm::StringRef class_name) override
 Get the priority of this frame provider.
StructuredData::ObjectSP GetFrameAtIndex (uint32_t index) override
llvm::StringRef GetPluginName () override
Public Member Functions inherited from lldb_private::ScriptedInterface
 ScriptedInterface ()=default
virtual ~ScriptedInterface ()=default
StructuredData::GenericSP GetScriptObjectInstance ()
llvm::SmallVector< llvm::StringLiteral > const GetAbstractMethods () const
Public Member Functions inherited from lldb_private::ScriptedPythonInterface
 ScriptedPythonInterface (ScriptInterpreterPythonImpl &interpreter)
 ~ScriptedPythonInterface () override=default
llvm::Expected< FileSpecGetScriptedModulePath () override
llvm::Expected< std::map< llvm::StringLiteral, AbstractMethodCheckerPayload > > CheckAbstractMethodImplementation (const python::PythonDictionary &class_dict) const
template<typename... Args>
llvm::Expected< StructuredData::GenericSPCreatePluginObject (llvm::StringRef class_name, StructuredData::Generic *script_obj, Args... args)
template<typename T = StructuredData::ObjectSP, typename... Args>
CallStaticMethod (llvm::StringRef class_name, llvm::StringRef method_name, Status &error, Args &&...args)
 Call a static method on a Python class without creating an instance.
Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
virtual ~PluginInterface ()=default
 PluginInterface (const PluginInterface &)=delete
PluginInterfaceoperator= (const PluginInterface &)=delete

Static Public Member Functions

static void Initialize ()
static void Terminate ()
static bool CreateInstance (lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)
static llvm::StringRef GetPluginNameStatic ()
Static Public Member Functions inherited from lldb_private::ScriptedInterface
template<typename Ret>
static Ret ErrorWithMessage (llvm::StringRef caller_name, llvm::StringRef error_msg, Status &error, LLDBLog log_category=LLDBLog::Process)
template<typename T = StructuredData::ObjectSP>
static bool CheckStructuredDataObject (llvm::StringRef caller, T obj, Status &error)
static bool CreateInstance (lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)

Additional Inherited Members

Public Types inherited from lldb_private::ScriptedPythonInterface
enum class  AbstractMethodCheckerCases {
  eNotImplemented , eNotAllocated , eNotCallable , eUnknownArgumentCount ,
  eInvalidArgumentCount , eValid
}
Protected Member Functions inherited from lldb_private::ScriptedPythonInterface
template<typename T = StructuredData::ObjectSP>
ExtractValueFromPythonObject (python::PythonObject &p, Status &error)
template<typename T = StructuredData::ObjectSP, typename... Args>
Dispatch (llvm::StringRef method_name, Status &error, Args &&...args)
template<typename... Args>
Status GetStatusFromMethod (llvm::StringRef method_name, Args &&...args)
template<typename T>
Transform (T object)
python::PythonObject Transform (bool arg)
python::PythonObject Transform (const Status &arg)
python::PythonObject Transform (Status &&arg)
python::PythonObject Transform (const StructuredDataImpl &arg)
python::PythonObject Transform (lldb::ExecutionContextRefSP arg)
python::PythonObject Transform (lldb::TargetSP arg)
python::PythonObject Transform (lldb::BreakpointSP arg)
python::PythonObject Transform (lldb::BreakpointLocationSP arg)
python::PythonObject Transform (lldb::ProcessSP arg)
python::PythonObject Transform (lldb::ThreadSP arg)
python::PythonObject Transform (lldb::StackFrameListSP arg)
python::PythonObject Transform (lldb::ThreadPlanSP arg)
python::PythonObject Transform (lldb::ProcessAttachInfoSP arg)
python::PythonObject Transform (lldb::ProcessLaunchInfoSP arg)
python::PythonObject Transform (Event *arg)
python::PythonObject Transform (const SymbolContext &arg)
python::PythonObject Transform (lldb::StreamSP arg)
python::PythonObject Transform (lldb::StackFrameSP arg)
python::PythonObject Transform (lldb::DataExtractorSP arg)
python::PythonObject Transform (lldb::DescriptionLevel arg)
python::PythonObject Transform (lldb::ValueObjectSP arg)
template<typename T, typename U>
void ReverseTransform (T &original_arg, U transformed_arg, Status &error)
template<typename T>
void ReverseTransform (T &original_arg, python::PythonObject transformed_arg, Status &error)
void ReverseTransform (bool &original_arg, python::PythonObject transformed_arg, Status &error)
template<std::size_t... I, typename... Args>
auto TransformTuple (const std::tuple< Args... > &args, std::index_sequence< I... >)
template<typename... Args>
auto TransformArgs (const std::tuple< Args... > &args)
template<typename T, typename U>
void TransformBack (T &original_arg, U transformed_arg, Status &error)
template<std::size_t... I, typename... Ts, typename... Us>
bool ReassignPtrsOrRefsArgs (std::tuple< Ts... > &original_args, std::tuple< Us... > &transformed_args, std::index_sequence< I... >)
template<typename... Ts, typename... Us>
bool ReassignPtrsOrRefsArgs (std::tuple< Ts... > &original_args, std::tuple< Us... > &transformed_args)
template<typename T, typename... Args>
void FormatArgs (std::string &fmt, T arg, Args... args) const
template<typename T>
void FormatArgs (std::string &fmt, T arg) const
void FormatArgs (std::string &fmt) const
template<>
Status ExtractValueFromPythonObject (python::PythonObject &p, Status &error)
template<>
EventExtractValueFromPythonObject (python::PythonObject &p, Status &error)
template<>
SymbolContext ExtractValueFromPythonObject (python::PythonObject &p, Status &error)
template<>
Status ExtractValueFromPythonObject (python::PythonObject &p, Status &error)
template<>
EventExtractValueFromPythonObject (python::PythonObject &p, Status &error)
template<>
SymbolContext ExtractValueFromPythonObject (python::PythonObject &p, Status &error)
Protected Attributes inherited from lldb_private::ScriptedInterface
StructuredData::GenericSP m_object_instance_sp
Protected Attributes inherited from lldb_private::ScriptedPythonInterface
ScriptInterpreterPythonImplm_interpreter

Detailed Description

Definition at line 18 of file ScriptedFrameProviderPythonInterface.h.

Constructor & Destructor Documentation

◆ ScriptedFrameProviderPythonInterface()

ScriptedFrameProviderPythonInterface::ScriptedFrameProviderPythonInterface ( ScriptInterpreterPythonImpl & interpreter)

Member Function Documentation

◆ AppliesToThread()

bool ScriptedFrameProviderPythonInterface::AppliesToThread ( llvm::StringRef class_name,
lldb::ThreadSP thread_sp )
overridevirtual

◆ CreateInstance()

bool ScriptedFrameProviderPythonInterface::CreateInstance ( lldb::ScriptLanguage language,
ScriptedInterfaceUsages usages )
static

Definition at line 100 of file ScriptedFrameProviderPythonInterface.cpp.

References lldb::eScriptLanguagePython.

Referenced by Initialize(), and Terminate().

◆ CreatePluginObject()

llvm::Expected< StructuredData::GenericSP > ScriptedFrameProviderPythonInterface::CreatePluginObject ( llvm::StringRef class_name,
lldb::StackFrameListSP input_frames,
StructuredData::DictionarySP args_sp )
overridevirtual

◆ GetAbstractMethodRequirements()

llvm::SmallVector< AbstractMethodRequirement > lldb_private::ScriptedFrameProviderPythonInterface::GetAbstractMethodRequirements ( ) const
inlineoverridevirtual

◆ GetDescription()

std::string ScriptedFrameProviderPythonInterface::GetDescription ( llvm::StringRef class_name)
overridevirtual

Get a description string for the frame provider.

This is called by the descriptor to fetch a description from the scripted implementation. Implementations should call a static method on the scripting class to retrieve the description.

Parameters
class_nameThe name of the scripting class implementing the provider.
Returns
A string describing what this frame provider does, or an empty string if no description is available.

Reimplemented from lldb_private::ScriptedFrameProviderInterface.

Definition at line 58 of file ScriptedFrameProviderPythonInterface.cpp.

References lldb_private::ScriptedPythonInterface::CallStaticMethod(), lldb_private::ScriptedInterface::CheckStructuredDataObject(), and error().

◆ GetFrameAtIndex()

StructuredData::ObjectSP ScriptedFrameProviderPythonInterface::GetFrameAtIndex ( uint32_t index)
overridevirtual

◆ GetPluginName()

llvm::StringRef lldb_private::ScriptedFrameProviderPythonInterface::GetPluginName ( )
inlineoverridevirtual

◆ GetPluginNameStatic()

llvm::StringRef lldb_private::ScriptedFrameProviderPythonInterface::GetPluginNameStatic ( )
inlinestatic

Definition at line 52 of file ScriptedFrameProviderPythonInterface.h.

Referenced by GetPluginName(), and Initialize().

◆ GetPriority()

std::optional< uint32_t > ScriptedFrameProviderPythonInterface::GetPriority ( llvm::StringRef class_name)
overridevirtual

Get the priority of this frame provider.

This is called by the descriptor to fetch the priority from the scripted implementation. Implementations should call a static method on the scripting class to retrieve the priority. Lower numbers indicate higher priority (like Unix nice values).

Parameters
class_nameThe name of the scripting class implementing the provider.
Returns
Priority value where 0 is highest priority, or std::nullopt for default priority (UINT32_MAX - lowest priority).

Reimplemented from lldb_private::ScriptedFrameProviderInterface.

Definition at line 71 of file ScriptedFrameProviderPythonInterface.cpp.

References lldb_private::ScriptedPythonInterface::CallStaticMethod(), lldb_private::ScriptedInterface::CheckStructuredDataObject(), and error().

◆ Initialize()

◆ Terminate()

void ScriptedFrameProviderPythonInterface::Terminate ( )
static

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