|
LLDB mainline
|
Base class for all synthetic frame providers. More...
#include <SyntheticFrameProvider.h>
Public Member Functions | |
| ~SyntheticFrameProvider () override | |
| virtual std::string | GetDescription () const =0 |
| virtual std::optional< uint32_t > | GetPriority () const |
| Get the priority of this frame provider. | |
| virtual llvm::Expected< lldb::StackFrameSP > | GetFrameAtIndex (uint32_t idx)=0 |
| Get a single stack frame at the specified index. | |
| Thread & | GetThread () |
| Get the thread associated with this provider. | |
| lldb::StackFrameListSP | GetInputFrames () const |
| Get the input frames that this provider transforms. | |
| Public Member Functions inherited from lldb_private::PluginInterface | |
| PluginInterface ()=default | |
| virtual | ~PluginInterface ()=default |
| virtual llvm::StringRef | GetPluginName ()=0 |
| PluginInterface (const PluginInterface &)=delete | |
| PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
| 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. | |
| static llvm::Expected< lldb::SyntheticFrameProviderSP > | CreateInstance (lldb::StackFrameListSP input_frames, llvm::StringRef plugin_name, const std::vector< ThreadSpec > &thread_specs={}) |
| Try to create a SyntheticFrameProvider instance for the given input frames using a specific C++ plugin. | |
Protected Member Functions | |
| SyntheticFrameProvider (lldb::StackFrameListSP input_frames) | |
Protected Attributes | |
| lldb::StackFrameListSP | m_input_frames |
Base class for all synthetic frame providers.
Synthetic frame providers allow modifying or replacing the stack frames shown for a thread. This is useful for:
Definition at line 104 of file SyntheticFrameProvider.h.
|
overridedefault |
|
protected |
Definition at line 21 of file SyntheticFrameProvider.cpp.
References m_input_frames.
Referenced by lldb_private::ScriptedFrameProvider::ScriptedFrameProvider().
|
static |
Try to create a SyntheticFrameProvider instance for the given input frames and descriptor.
This method iterates through all registered SyntheticFrameProvider plugins and returns the first one that can handle the given descriptor.
| [in] | input_frames | The input stack frame list that this provider will transform. This could be real unwound frames or output from another provider. |
| [in] | descriptor | The descriptor containing metadata for the provider. |
Definition at line 79 of file SyntheticFrameProvider.cpp.
References lldb_private::GetLog(), lldb_private::PluginManager::GetScriptedFrameProviderCreateCallbackAtIndex(), LLDB_LOG_ERROR, and lldb_private::Target.
Referenced by lldb_private::Thread::LoadScriptedFrameProvider().
|
static |
Try to create a SyntheticFrameProvider instance for the given input frames using a specific C++ plugin.
This method directly invokes a specific SyntheticFrameProvider plugin by name, bypassing the descriptor-based plugin iteration. This is useful for C++ plugins that don't require scripted metadata.
| [in] | input_frames | The input stack frame list that this provider will transform. This could be real unwound frames or output from another provider. |
| [in] | plugin_name | The name of the plugin to use for creating the provider. |
| [in] | thread_specs | Optional list of thread specifications to which this provider applies. If empty, the provider applies to all threads. |
Definition at line 108 of file SyntheticFrameProvider.cpp.
References lldb_private::PluginManager::GetSyntheticFrameProviderCreateCallbackForPluginName().
|
pure virtual |
Implemented in lldb_private::ScriptedFrameProvider.
|
pure virtual |
Get a single stack frame at the specified index.
This method is called lazily - frames are only created when requested. The provider can access its input frames via GetInputFrames() if needed.
| [in] | idx | The index of the frame to create. |
Implemented in lldb_private::ScriptedFrameProvider.
|
inline |
Get the input frames that this provider transforms.
Definition at line 185 of file SyntheticFrameProvider.h.
References m_input_frames.
|
inlinevirtual |
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).
Reimplemented in lldb_private::ScriptedFrameProvider.
Definition at line 165 of file SyntheticFrameProvider.h.
|
inline |
Get the thread associated with this provider.
Definition at line 182 of file SyntheticFrameProvider.h.
References m_input_frames.
Referenced by lldb_private::ScriptedFrameProvider::GetFrameAtIndex().
|
protected |
Definition at line 190 of file SyntheticFrameProvider.h.
Referenced by lldb_private::ScriptedFrameProvider::GetFrameAtIndex(), GetInputFrames(), GetThread(), and SyntheticFrameProvider().