|
LLDB mainline
|
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. | |
| std::optional< uint32_t > | GetPriority () const |
| Get the priority 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. | |
| void | SetID (uint32_t id) |
| Set the monotonically increasing ID for this descriptor. | |
| uint32_t | GetHash () const |
| Get the content-based hash from ScriptedMetadata. | |
| 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< ThreadSpec > | thread_specs |
| Optional list of thread specifications to which this provider applies. | |
| uint32_t | m_id = LLDB_INVALID_FRAME_PROVIDER_ID |
| Monotonically increasing ID assigned by Target when this descriptor is registered. | |
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.
|
default |
|
inline |
Definition at line 46 of file SyntheticFrameProvider.h.
References scripted_metadata_sp.
|
inline |
Definition at line 49 of file SyntheticFrameProvider.h.
References scripted_metadata_sp, and thread_specs.
Check if this descriptor applies to the given thread.
Definition at line 75 of file SyntheticFrameProvider.h.
References thread_specs.
Referenced by lldb_private::ScriptedFrameProvider::CreateInstance(), and lldb_private::Thread::GetStackFrameList().
| void ScriptedFrameProviderDescriptor::Dump | ( | Stream * | s | ) | const |
Dump a description of this descriptor to the given stream.
Definition at line 26 of file SyntheticFrameProvider.cpp.
References lldb::eDescriptionLevelVerbose, lldb_private::Stream::EOL(), lldb_private::Stream::Format(), GetDescription(), lldb_private::ThreadSpec::GetDescription(), GetID(), GetName(), GetPriority(), lldb_private::Stream::PutCString(), and thread_specs.
Referenced by CommandObjectTargetFrameProviderList::DoExecute().
| std::string ScriptedFrameProviderDescriptor::GetDescription | ( | ) | const |
Get the description of this frame provider.
Definition at line 65 of file SyntheticFrameProvider.cpp.
References interface_sp, and scripted_metadata_sp.
Referenced by Dump().
| uint32_t ScriptedFrameProviderDescriptor::GetHash | ( | ) | const |
Get the content-based hash from ScriptedMetadata.
Used for duplicate detection (same class name + args).
Definition at line 58 of file SyntheticFrameProvider.cpp.
References scripted_metadata_sp.
Referenced by lldb_private::Target::AddScriptedFrameProviderDescriptor().
|
inline |
Get a unique identifier for this descriptor.
Returns the monotonically increasing ID assigned by Target if set, otherwise returns LLDB_INVALID_FRAME_PROVIDER_ID (UINT32_MAX).
Definition at line 94 of file SyntheticFrameProvider.h.
References m_id.
Referenced by Dump(), and lldb_private::Thread::LoadScriptedFrameProvider().
|
inline |
Get the name of this descriptor (the scripted class name).
Definition at line 54 of file SyntheticFrameProvider.h.
References scripted_metadata_sp.
Referenced by lldb_private::Target::AddScriptedFrameProviderDescriptor(), and Dump().
| std::optional< uint32_t > ScriptedFrameProviderDescriptor::GetPriority | ( | ) | const |
Get the priority of this frame provider.
Priority determines the order in which providers are evaluated when multiple providers could apply to the same thread. Lower numbers indicate higher priority (like Unix nice values).
Definition at line 72 of file SyntheticFrameProvider.cpp.
References interface_sp, and scripted_metadata_sp.
Referenced by Dump(), and lldb_private::Thread::GetStackFrameList().
|
inline |
Check if this descriptor has valid metadata for script-based providers.
Definition at line 89 of file SyntheticFrameProvider.h.
References scripted_metadata_sp.
Referenced by lldb_private::Target::AddScriptedFrameProviderDescriptor(), lldb_private::ScriptedFrameProvider::CreateInstance(), and lldb_private::Thread::GetStackFrameList().
|
inline |
Set the monotonically increasing ID for this descriptor.
Called by Target when the descriptor is registered.
Definition at line 98 of file SyntheticFrameProvider.h.
References m_id.
Referenced by lldb_private::Target::AddScriptedFrameProviderDescriptor().
| 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(), GetPriority(), and lldb::SBTarget::RegisterScriptedFrameProvider().
| uint32_t lldb_private::ScriptedFrameProviderDescriptor::m_id = LLDB_INVALID_FRAME_PROVIDER_ID |
Monotonically increasing ID assigned by Target when this descriptor is registered.
LLDB_INVALID_FRAME_PROVIDER_ID (UINT32_MAX) means no ID has been assigned yet.
Definition at line 42 of file SyntheticFrameProvider.h.
| 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(), GetHash(), GetName(), GetPriority(), IsValid(), ScriptedFrameProviderDescriptor(), and ScriptedFrameProviderDescriptor().
| 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().