9#ifndef LLDB_TARGET_STACKFRAMERECOGNIZER_H
10#define LLDB_TARGET_STACKFRAMERECOGNIZER_H
33 :
public std::enable_shared_from_this<RecognizedStackFrame> {
61 :
public std::enable_shared_from_this<StackFrameRecognizer> {
109 ConstString module, llvm::ArrayRef<ConstString> symbols,
110 bool first_instruction_only =
true);
115 bool first_instruction_only =
true);
118 void(uint32_t recognizer_id, std::string recognizer_name,
119 std::string module, llvm::ArrayRef<ConstString> symbols,
120 bool regexp)>
const &callback);
177 llvm::Expected<uint32_t>
Generic representation of a type in a programming language.
A uniqued constant string class.
This class provides extra information about a stack frame that was provided by a specific stack frame...
virtual lldb::ValueObjectListSP GetRecognizedArguments()
std::string GetStopDescription()
virtual bool ShouldHide()
Controls whether this frame should be filtered out when displaying backtraces, for example.
lldb::ValueObjectListSP m_arguments
virtual lldb::ValueObjectSP GetExceptionObject()
virtual lldb::StackFrameSP GetMostRelevantFrame()
virtual ~RecognizedStackFrame()=default
Python implementation for frame recognizers.
std::string GetName() override
~ScriptedStackFrameRecognizer() override=default
const char * GetPythonClassName()
lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame) override
ScriptedStackFrameRecognizer(const ScriptedStackFrameRecognizer &)=delete
lldb_private::StructuredData::ObjectSP m_python_object_sp
std::string m_python_class
const ScriptedStackFrameRecognizer & operator=(const ScriptedStackFrameRecognizer &)=delete
lldb_private::ScriptInterpreter * m_interpreter
Class that provides a registry of known stack frame recognizers.
void BumpGeneration()
Increase the generation counter.
lldb::StackFrameRecognizerSP GetRecognizerForFrame(lldb::StackFrameSP frame)
lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame)
bool RemoveRecognizerWithID(uint32_t recognizer_id)
void RemoveAllRecognizers()
void ForEach(std::function< void(uint32_t recognizer_id, std::string recognizer_name, std::string module, llvm::ArrayRef< ConstString > symbols, bool regexp)> const &callback)
std::deque< RegisteredEntry > m_recognizers
void AddRecognizer(lldb::StackFrameRecognizerSP recognizer, ConstString module, llvm::ArrayRef< ConstString > symbols, bool first_instruction_only=true)
uint16_t GetGeneration() const
Returns a number that changes whenever the list of recognizers has been modified.
A base class for frame recognizers.
virtual std::string GetName()
virtual ~StackFrameRecognizer()=default
virtual lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame)
std::shared_ptr< Object > ObjectSP
ValueObject subclass that presents the passed ValueObject as a recognized value with the specified Va...
CompilerType GetCompilerTypeImpl() override
ValueObjectRecognizerSynthesizedValue(ValueObject &parent, lldb::ValueType type)
llvm::Expected< uint32_t > CalculateNumChildren(uint32_t max=UINT32_MAX) override
Should only be called by ValueObject::GetNumChildren().
lldb::ValueType GetValueType() const override
bool IsSynthetic() override
static lldb::ValueObjectSP Create(ValueObject &parent, lldb::ValueType type)
std::optional< uint64_t > GetByteSize() override
bool UpdateValue() override
CompilerType GetCompilerType()
virtual std::optional< uint64_t > GetByteSize()=0
llvm::Expected< uint32_t > GetNumChildren(uint32_t max=UINT32_MAX)
ValueObject * m_parent
The parent value object, or nullptr if this has no parent.
bool UpdateValueIfNeeded(bool update_format=true)
void SetName(ConstString name)
Change the name of the current ValueObject.
ConstString GetName() const
const Value & GetValue() const
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::RecognizedStackFrame > RecognizedStackFrameSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::RegularExpression > RegularExpressionSP
std::shared_ptr< lldb_private::ValueObjectList > ValueObjectListSP
std::shared_ptr< lldb_private::StackFrameRecognizer > StackFrameRecognizerSP
lldb::RegularExpressionSP symbol_regexp
std::vector< ConstString > symbols
bool first_instruction_only
lldb::RegularExpressionSP module_regexp
lldb::StackFrameRecognizerSP recognizer