LLDB mainline
lldb_private::ScriptedInterface Class Referenceabstract

#include <ScriptedInterface.h>

Inheritance diagram for lldb_private::ScriptedInterface:
[legend]

Classes

struct  AbstractMethodRequirement

Public Member Functions

 ScriptedInterface ()=default
virtual ~ScriptedInterface ()=default
StructuredData::GenericSP GetScriptObjectInstance ()
const std::optional< ScriptedMetadata > & GetScriptedMetadata () const
virtual llvm::SmallVector< AbstractMethodRequirementGetAbstractMethodRequirements () const =0
virtual llvm::Expected< FileSpecGetScriptedModulePath ()
llvm::SmallVector< llvm::StringLiteral > const GetAbstractMethods () const

Static Public Member Functions

template<typename Ret>
static Ret ErrorWithMessage (llvm::StringRef caller_name, llvm::StringRef user_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)

Protected Attributes

StructuredData::GenericSP m_object_instance_sp
std::optional< ScriptedMetadatam_scripted_metadata

Detailed Description

Definition at line 27 of file ScriptedInterface.h.

Constructor & Destructor Documentation

◆ ScriptedInterface()

lldb_private::ScriptedInterface::ScriptedInterface ( )
default

◆ ~ScriptedInterface()

virtual lldb_private::ScriptedInterface::~ScriptedInterface ( )
virtualdefault

Member Function Documentation

◆ CheckStructuredDataObject()

template<typename T = StructuredData::ObjectSP>
bool lldb_private::ScriptedInterface::CheckStructuredDataObject ( llvm::StringRef caller,
T obj,
Status & error )
inlinestatic

Definition at line 82 of file ScriptedInterface.h.

References error(), and ErrorWithMessage().

Referenced by lldb_private::ScriptedFrameProviderPythonInterface::AppliesToThread(), lldb_private::ScriptedSyntheticChildrenPythonInterface::CalculateNumChildren(), lldb_private::ScriptedProcessPythonInterface::CreateBreakpoint(), lldb_private::OperatingSystemPythonInterface::CreateThread(), lldb_private::OperatingSystemPythonInterface::DoesPluginReportAllThreads(), lldb_private::ScriptedThreadPlanPythonInterface::ExplainsStop(), lldb_private::ScriptedProcessPythonInterface::GetCapabilities(), lldb_private::ScriptedBreakpointPythonInterface::GetDepth(), lldb_private::ScriptedFrameProviderPythonInterface::GetDescription(), lldb_private::ScriptedFramePythonInterface::GetDisplayFunctionName(), lldb_private::ScriptedThreadPythonInterface::GetExtendedInfo(), lldb_private::ScriptedCommandPythonInterface::GetFlags(), lldb_private::ScriptedFrameProviderPythonInterface::GetFrameAtIndex(), lldb_private::ScriptedFramePythonInterface::GetFunctionName(), lldb_private::ScriptedFramePythonInterface::GetID(), lldb_private::ScriptedSyntheticChildrenPythonInterface::GetIndexOfChildWithName(), lldb_private::ScriptedProcessPythonInterface::GetLoadedImages(), lldb_private::ScriptedBreakpointPythonInterface::GetLocationDescription(), lldb_private::ScriptedCommandPythonInterface::GetLongHelp(), lldb_private::ScriptedProcessPythonInterface::GetMetadata(), lldb_private::ScriptedThreadPythonInterface::GetName(), lldb_private::ScriptedFramePythonInterface::GetPC(), lldb_private::ScriptedFrameProviderPythonInterface::GetPriority(), lldb_private::ScriptedProcessPythonInterface::GetProcessID(), lldb_private::ScriptedThreadPythonInterface::GetQueue(), lldb_private::ScriptedFramePythonInterface::GetRegisterContext(), lldb_private::ScriptedThreadPythonInterface::GetRegisterContext(), lldb_private::OperatingSystemPythonInterface::GetRegisterContextForTID(), lldb_private::ScriptedFramePythonInterface::GetRegisterInfo(), lldb_private::ScriptedThreadPythonInterface::GetRegisterInfo(), lldb_private::ScriptedCommandPythonInterface::GetRepeatCommand(), lldb_private::ScriptedThreadPlanPythonInterface::GetRunState(), lldb_private::ScriptedThreadPythonInterface::GetScriptedFramePluginName(), lldb_private::ScriptedProcessPythonInterface::GetScriptedThreadPluginName(), lldb_private::ScriptedBreakpointPythonInterface::GetShortHelp(), lldb_private::ScriptedCommandPythonInterface::GetShortHelp(), lldb_private::ScriptedThreadPythonInterface::GetStackFrames(), lldb_private::ScriptedThreadPythonInterface::GetState(), lldb_private::ScriptedStackFrameRecognizerPythonInterface::GetStopDescription(), lldb_private::ScriptedThreadPythonInterface::GetStopReason(), lldb_private::ScriptedStringSummaryPythonInterface::GetSummary(), lldb_private::ScriptedSyntheticChildrenPythonInterface::GetSyntheticTypeName(), lldb_private::ScriptedThreadPythonInterface::GetThreadID(), lldb_private::OperatingSystemPythonInterface::GetThreadInfo(), lldb_private::ScriptedProcessPythonInterface::GetThreadsInfo(), lldb_private::ScriptedCommandPythonInterface::HandleArgumentCompletion(), lldb_private::ScriptedCommandPythonInterface::HandleOptionArgumentCompletion(), lldb_private::ScriptedHookPythonInterface::HandleStop(), lldb_private::ScriptedProcessPythonInterface::IsAlive(), lldb_private::ScriptedFramePythonInterface::IsArtificial(), lldb_private::ScriptedFramePythonInterface::IsHidden(), lldb_private::ScriptedFramePythonInterface::IsInlined(), lldb_private::ScriptedThreadPlanPythonInterface::IsStale(), lldb_private::ScriptedSyntheticChildrenPythonInterface::MightHaveChildren(), lldb_private::ScriptedBreakpointPythonInterface::OverridesResolver(), lldb_private::ScriptedBreakpointPythonInterface::ResolverCallback(), lldb_private::ScriptedBreakpointPythonInterface::SetBreakpoint(), lldb_private::ScriptedCommandPythonInterface::SetOptionValue(), lldb_private::ScriptedStackFrameRecognizerPythonInterface::ShouldHide(), lldb_private::ScriptedThreadPlanPythonInterface::ShouldStop(), lldb_private::ScriptedSyntheticChildrenPythonInterface::Update(), and lldb_private::ScriptedProcessPythonInterface::WriteMemoryAtAddress().

◆ CreateInstance()

bool lldb_private::ScriptedInterface::CreateInstance ( lldb::ScriptLanguage language,
ScriptedInterfaceUsages usages )
inlinestatic

Definition at line 99 of file ScriptedInterface.h.

Referenced by lldb_private::OperatingSystemPythonInterface::Initialize(), lldb_private::ScriptedBreakpointPythonInterface::Initialize(), lldb_private::ScriptedCommandPythonInterface::Initialize(), lldb_private::ScriptedFramePythonInterface::Initialize(), lldb_private::ScriptedHookPythonInterface::Initialize(), lldb_private::ScriptedPlatformPythonInterface::Initialize(), lldb_private::ScriptedProcessPythonInterface::Initialize(), lldb_private::ScriptedStackFrameRecognizerPythonInterface::Initialize(), lldb_private::ScriptedStringSummaryPythonInterface::Initialize(), lldb_private::ScriptedSyntheticChildrenPythonInterface::Initialize(), lldb_private::ScriptedThreadPlanPythonInterface::Initialize(), lldb_private::ScriptedThreadPythonInterface::Initialize(), lldb_private::OperatingSystemPythonInterface::Terminate(), lldb_private::ScriptedBreakpointPythonInterface::Terminate(), lldb_private::ScriptedCommandPythonInterface::Terminate(), lldb_private::ScriptedFramePythonInterface::Terminate(), lldb_private::ScriptedHookPythonInterface::Terminate(), lldb_private::ScriptedPlatformPythonInterface::Terminate(), lldb_private::ScriptedProcessPythonInterface::Terminate(), lldb_private::ScriptedStackFrameRecognizerPythonInterface::Terminate(), lldb_private::ScriptedStringSummaryPythonInterface::Terminate(), lldb_private::ScriptedSyntheticChildrenPythonInterface::Terminate(), lldb_private::ScriptedThreadPlanPythonInterface::Terminate(), and lldb_private::ScriptedThreadPythonInterface::Terminate().

◆ ErrorWithMessage()

template<typename Ret>
Ret lldb_private::ScriptedInterface::ErrorWithMessage ( llvm::StringRef caller_name,
llvm::StringRef user_msg,
Status & error,
LLDBLog log_category = LLDBLog::Process )
inlinestatic

Definition at line 62 of file ScriptedInterface.h.

References error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormatv(), lldb_private::GetLog(), LLDB_LOGF, and lldb_private::Process.

Referenced by lldb_private::ScriptedThread::CalculateStopInfo(), lldb_private::ScriptedPythonInterface::CallStaticMethod(), CheckStructuredDataObject(), lldb_private::ScriptedThread::CreateRegisterContextForFrame(), lldb_private::ScriptedPythonInterface::Dispatch(), lldb_private::ScriptedProcess::DoReadMemory(), lldb_private::ScriptedProcess::DoUpdateThreadList(), lldb_private::ScriptedProcess::DoWriteMemory(), lldb_private::ScriptedThread::FetchThreadExtendedInfo(), lldb_private::ScriptedFrame::GetDynamicRegisterInfo(), lldb_private::ScriptedThread::GetDynamicRegisterInfo(), lldb_private::ScriptedFrameProvider::GetFrameAtIndex(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), lldb_private::ScriptedProcessPythonInterface::GetMemoryRegionContainingAddress(), lldb_private::ScriptedProcess::GetMetadata(), lldb_private::ScriptedPlatformPythonInterface::GetProcessInfo(), lldb_private::ScriptedFrame::GetRegisterContext(), lldb_private::ScriptedFramePythonInterface::GetSymbolContext(), lldb_private::ScriptedFramePythonInterface::GetValueObjectForVariableExpression(), lldb_private::ScriptedFramePythonInterface::GetValueTypeForVariable(), lldb_private::ScriptedFramePythonInterface::GetVariables(), lldb_private::ScriptedPlatformPythonInterface::ListProcesses(), and lldb_private::ScriptedThread::LoadArtificialStackFrames().

◆ GetAbstractMethodRequirements()

◆ GetAbstractMethods()

llvm::SmallVector< llvm::StringLiteral > const lldb_private::ScriptedInterface::GetAbstractMethods ( ) const
inline

◆ GetScriptedMetadata()

const std::optional< ScriptedMetadata > & lldb_private::ScriptedInterface::GetScriptedMetadata ( ) const
inline

Definition at line 36 of file ScriptedInterface.h.

References m_scripted_metadata.

Referenced by lldb_private::ScriptedPythonInterface::Dispatch().

◆ GetScriptedModulePath()

virtual llvm::Expected< FileSpec > lldb_private::ScriptedInterface::GetScriptedModulePath ( )
inlinevirtual

Reimplemented in lldb_private::ScriptedPythonInterface.

Definition at line 48 of file ScriptedInterface.h.

◆ GetScriptObjectInstance()

StructuredData::GenericSP lldb_private::ScriptedInterface::GetScriptObjectInstance ( )
inline

Member Data Documentation

◆ m_object_instance_sp

◆ m_scripted_metadata

std::optional<ScriptedMetadata> lldb_private::ScriptedInterface::m_scripted_metadata
protected

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