LLDB mainline
lldb_private::ScriptedFrameProviderDescriptor Struct Reference

This struct contains the metadata needed to instantiate a frame provider and optional filters to control which threads it applies to. More...

#include <SyntheticFrameProvider.h>

Public Member Functions

 ScriptedFrameProviderDescriptor ()=default
 ScriptedFrameProviderDescriptor (lldb::ScriptedMetadataSP metadata_sp)
 ScriptedFrameProviderDescriptor (lldb::ScriptedMetadataSP metadata_sp, const std::vector< ThreadSpec > &specs)
llvm::StringRef GetName () const
 Get the name of this descriptor (the scripted class name).
std::string GetDescription () const
 Get the description of this frame provider.
bool AppliesToThread (Thread &thread) const
 Check if this descriptor applies to the given thread.
bool IsValid () const
 Check if this descriptor has valid metadata for script-based providers.
uint32_t GetID () const
 Get a unique identifier for this descriptor based on its contents.
void Dump (Stream *s) const
 Dump a description of this descriptor to the given stream.

Public Attributes

lldb::ScriptedMetadataSP scripted_metadata_sp
 Metadata for instantiating the provider (e.g. script class name and args).
lldb::ScriptedFrameProviderInterfaceSP interface_sp
 Interface for calling static methods on the provider class.
std::vector< ThreadSpecthread_specs
 Optional list of thread specifications to which this provider applies.

Detailed Description

This struct contains the metadata needed to instantiate a frame provider and optional filters to control which threads it applies to.

Definition at line 27 of file SyntheticFrameProvider.h.

Constructor & Destructor Documentation

◆ ScriptedFrameProviderDescriptor() [1/3]

lldb_private::ScriptedFrameProviderDescriptor::ScriptedFrameProviderDescriptor ( )
default

◆ ScriptedFrameProviderDescriptor() [2/3]

lldb_private::ScriptedFrameProviderDescriptor::ScriptedFrameProviderDescriptor ( lldb::ScriptedMetadataSP metadata_sp)
inline

Definition at line 41 of file SyntheticFrameProvider.h.

References scripted_metadata_sp.

◆ ScriptedFrameProviderDescriptor() [3/3]

lldb_private::ScriptedFrameProviderDescriptor::ScriptedFrameProviderDescriptor ( lldb::ScriptedMetadataSP metadata_sp,
const std::vector< ThreadSpec > & specs )
inline

Definition at line 44 of file SyntheticFrameProvider.h.

References scripted_metadata_sp, and thread_specs.

Member Function Documentation

◆ AppliesToThread()

bool lldb_private::ScriptedFrameProviderDescriptor::AppliesToThread ( Thread & thread) const
inline

Check if this descriptor applies to the given thread.

Definition at line 60 of file SyntheticFrameProvider.h.

References thread_specs.

Referenced by lldb_private::ScriptedFrameProvider::CreateInstance(), and lldb_private::Thread::GetStackFrameList().

◆ Dump()

◆ GetDescription()

std::string ScriptedFrameProviderDescriptor::GetDescription ( ) const

Get the description of this frame provider.

Returns
A string describing what this frame provider does, or an empty string if no description is available.

Definition at line 58 of file SyntheticFrameProvider.cpp.

References interface_sp, and scripted_metadata_sp.

Referenced by Dump().

◆ GetID()

uint32_t ScriptedFrameProviderDescriptor::GetID ( ) const

Get a unique identifier for this descriptor based on its contents.

The ID is computed from the class name and arguments dictionary, not from the pointer address, so two descriptors with the same contents will have the same ID.

Definition at line 51 of file SyntheticFrameProvider.cpp.

References scripted_metadata_sp.

Referenced by lldb_private::Target::AddScriptedFrameProviderDescriptor(), and Dump().

◆ GetName()

llvm::StringRef lldb_private::ScriptedFrameProviderDescriptor::GetName ( ) const
inline

Get the name of this descriptor (the scripted class name).

Definition at line 49 of file SyntheticFrameProvider.h.

References scripted_metadata_sp.

Referenced by lldb_private::Target::AddScriptedFrameProviderDescriptor(), and Dump().

◆ IsValid()

bool lldb_private::ScriptedFrameProviderDescriptor::IsValid ( ) const
inline

Check if this descriptor has valid metadata for script-based providers.

Definition at line 74 of file SyntheticFrameProvider.h.

References scripted_metadata_sp.

Referenced by lldb_private::Target::AddScriptedFrameProviderDescriptor(), lldb_private::ScriptedFrameProvider::CreateInstance(), and lldb_private::Thread::GetStackFrameList().

Member Data Documentation

◆ interface_sp

lldb::ScriptedFrameProviderInterfaceSP lldb_private::ScriptedFrameProviderDescriptor::interface_sp

Interface for calling static methods on the provider class.

Definition at line 32 of file SyntheticFrameProvider.h.

Referenced by CommandObjectTargetFrameProviderRegister::DoExecute(), GetDescription(), and lldb::SBTarget::RegisterScriptedFrameProvider().

◆ scripted_metadata_sp

lldb::ScriptedMetadataSP lldb_private::ScriptedFrameProviderDescriptor::scripted_metadata_sp

Metadata for instantiating the provider (e.g. script class name and args).

Definition at line 29 of file SyntheticFrameProvider.h.

Referenced by lldb_private::ScriptedFrameProvider::CreateInstance(), GetDescription(), GetID(), GetName(), IsValid(), ScriptedFrameProviderDescriptor(), and ScriptedFrameProviderDescriptor().

◆ thread_specs

std::vector<ThreadSpec> lldb_private::ScriptedFrameProviderDescriptor::thread_specs

Optional list of thread specifications to which this provider applies.

If empty, the provider applies to all threads. A thread matches if it satisfies ANY of the specs in this vector (OR logic).

Definition at line 37 of file SyntheticFrameProvider.h.

Referenced by AppliesToThread(), Dump(), and ScriptedFrameProviderDescriptor().


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