9#ifndef LLDB_TARGET_SYNTHETICFRAMEPROVIDER_H
10#define LLDB_TARGET_SYNTHETICFRAMEPROVIDER_H
18#include "llvm/Support/Error.h"
50 const std::vector<ThreadSpec> &specs)
82 if (spec.ThreadPassesBasicTests(thread))
134 static llvm::Expected<lldb::SyntheticFrameProviderSP>
159 static llvm::Expected<lldb::SyntheticFrameProviderSP>
161 llvm::StringRef plugin_name,
162 const std::vector<ThreadSpec> &thread_specs = {});
177 virtual std::optional<uint32_t>
GetPriority()
const {
return std::nullopt; }
PluginInterface()=default
A stream class that can stream formatted output to a file.
Thread & GetThread()
Get the thread associated with this provider.
lldb::StackFrameListSP GetInputFrames() const
Get the input frames that this provider transforms.
virtual std::string GetDescription() const =0
~SyntheticFrameProvider() override
static llvm::Expected< lldb::SyntheticFrameProviderSP > CreateInstance(lldb::StackFrameListSP input_frames, const ScriptedFrameProviderDescriptor &descriptor)
Try to create a SyntheticFrameProvider instance for the given input frames and descriptor.
virtual llvm::Expected< lldb::StackFrameSP > GetFrameAtIndex(uint32_t idx)=0
Get a single stack frame at the specified index.
lldb::StackFrameListSP m_input_frames
SyntheticFrameProvider(lldb::StackFrameListSP input_frames)
virtual std::optional< uint32_t > GetPriority() const
Get the priority of this frame provider.
#define LLDB_INVALID_FRAME_PROVIDER_ID
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ScriptedMetadata > ScriptedMetadataSP
std::shared_ptr< lldb_private::ScriptedFrameProviderInterface > ScriptedFrameProviderInterfaceSP
std::shared_ptr< lldb_private::StackFrameList > StackFrameListSP
This struct contains the metadata needed to instantiate a frame provider and optional filters to cont...
ScriptedFrameProviderDescriptor(lldb::ScriptedMetadataSP metadata_sp)
std::vector< ThreadSpec > thread_specs
Optional list of thread specifications to which this provider applies.
uint32_t GetID() const
Get a unique identifier for this descriptor.
lldb::ScriptedMetadataSP scripted_metadata_sp
Metadata for instantiating the provider (e.g. script class name and args).
ScriptedFrameProviderDescriptor()=default
void Dump(Stream *s) const
Dump a description of this descriptor to the given stream.
llvm::StringRef GetName() const
Get the name of this descriptor (the scripted class name).
lldb::ScriptedFrameProviderInterfaceSP interface_sp
Interface for calling static methods on the provider class.
ScriptedFrameProviderDescriptor(lldb::ScriptedMetadataSP metadata_sp, const std::vector< ThreadSpec > &specs)
uint32_t GetHash() const
Get the content-based hash from ScriptedMetadata.
std::string GetDescription() const
Get the description of this frame provider.
uint32_t m_id
Monotonically increasing ID assigned by Target when this descriptor is registered.
bool AppliesToThread(Thread &thread) const
Check if this descriptor applies to the given thread.
void SetID(uint32_t id)
Set the monotonically increasing ID for this descriptor.
bool IsValid() const
Check if this descriptor has valid metadata for script-based providers.
std::optional< uint32_t > GetPriority() const
Get the priority of this frame provider.