LLDB mainline
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::StackFrameRecognizerManager Class Reference

Class that provides a registry of known stack frame recognizers. More...

#include <StackFrameRecognizer.h>

Classes

struct  RegisteredEntry
 

Public Member Functions

void AddRecognizer (lldb::StackFrameRecognizerSP recognizer, ConstString module, llvm::ArrayRef< ConstString > symbols, Mangled::NamePreference symbol_mangling, bool first_instruction_only=true)
 Add a new recognizer that triggers on a given symbol name.
 
void AddRecognizer (lldb::StackFrameRecognizerSP recognizer, lldb::RegularExpressionSP module, lldb::RegularExpressionSP symbol, Mangled::NamePreference symbol_mangling, bool first_instruction_only=true)
 Add a new recognizer that triggers on a symbol regex.
 
void ForEach (std::function< void(uint32_t recognizer_id, bool enabled, std::string recognizer_name, std::string module, llvm::ArrayRef< ConstString > symbols, Mangled::NamePreference name_preference, bool regexp)> const &callback)
 
bool SetEnabledForID (uint32_t recognizer_id, bool enabled)
 
bool RemoveRecognizerWithID (uint32_t recognizer_id)
 
void RemoveAllRecognizers ()
 
lldb::StackFrameRecognizerSP GetRecognizerForFrame (lldb::StackFrameSP frame)
 
lldb::RecognizedStackFrameSP RecognizeFrame (lldb::StackFrameSP frame)
 
uint16_t GetGeneration () const
 Returns a number that changes whenever the list of recognizers has been modified.
 

Private Member Functions

void BumpGeneration ()
 Increase the generation counter.
 

Private Attributes

std::deque< RegisteredEntrym_recognizers
 
uint16_t m_generation = 0
 

Detailed Description

Class that provides a registry of known stack frame recognizers.

Definition at line 106 of file StackFrameRecognizer.h.

Member Function Documentation

◆ AddRecognizer() [1/2]

void StackFrameRecognizerManager::AddRecognizer ( lldb::StackFrameRecognizerSP  recognizer,
ConstString  module,
llvm::ArrayRef< ConstString symbols,
Mangled::NamePreference  symbol_mangling,
bool  first_instruction_only = true 
)

Add a new recognizer that triggers on a given symbol name.

Parameters
symbol_manglingcontrols whether the symbol name should be compared to the mangled or demangled name.

Definition at line 63 of file StackFrameRecognizer.cpp.

References BumpGeneration(), and m_recognizers.

Referenced by lldb_private::CPPLanguageRuntime::CPPLanguageRuntime(), CommandObjectFrameRecognizerAdd::DoExecute(), lldb_private::RegisterAbortWithPayloadFrameRecognizer(), lldb_private::RegisterAssertFrameRecognizer(), RegisterObjCExceptionRecognizer(), and lldb_private::RegisterVerboseTrapFrameRecognizer().

◆ AddRecognizer() [2/2]

void StackFrameRecognizerManager::AddRecognizer ( lldb::StackFrameRecognizerSP  recognizer,
lldb::RegularExpressionSP  module,
lldb::RegularExpressionSP  symbol,
Mangled::NamePreference  symbol_mangling,
bool  first_instruction_only = true 
)

Add a new recognizer that triggers on a symbol regex.

Parameters
symbol_manglingcontrols whether the regex should apply to the mangled or demangled name.

Definition at line 74 of file StackFrameRecognizer.cpp.

References BumpGeneration(), and m_recognizers.

◆ BumpGeneration()

void StackFrameRecognizerManager::BumpGeneration ( )
private

Increase the generation counter.

Definition at line 57 of file StackFrameRecognizer.cpp.

References m_generation.

Referenced by AddRecognizer(), RemoveAllRecognizers(), RemoveRecognizerWithID(), and SetEnabledForID().

◆ ForEach()

void StackFrameRecognizerManager::ForEach ( std::function< void(uint32_t recognizer_id, bool enabled, std::string recognizer_name, std::string module, llvm::ArrayRef< ConstString > symbols, Mangled::NamePreference name_preference, bool regexp)> const &  callback)

◆ GetGeneration()

uint16_t lldb_private::StackFrameRecognizerManager::GetGeneration ( ) const
inline

Returns a number that changes whenever the list of recognizers has been modified.

Definition at line 144 of file StackFrameRecognizer.h.

References m_generation.

◆ GetRecognizerForFrame()

StackFrameRecognizerSP StackFrameRecognizerManager::GetRecognizerForFrame ( lldb::StackFrameSP  frame)

◆ RecognizeFrame()

RecognizedStackFrameSP StackFrameRecognizerManager::RecognizeFrame ( lldb::StackFrameSP  frame)

Definition at line 187 of file StackFrameRecognizer.cpp.

References GetRecognizerForFrame().

◆ RemoveAllRecognizers()

void StackFrameRecognizerManager::RemoveAllRecognizers ( )

◆ RemoveRecognizerWithID()

bool StackFrameRecognizerManager::RemoveRecognizerWithID ( uint32_t  recognizer_id)

◆ SetEnabledForID()

bool StackFrameRecognizerManager::SetEnabledForID ( uint32_t  recognizer_id,
bool  enabled 
)

Member Data Documentation

◆ m_generation

uint16_t lldb_private::StackFrameRecognizerManager::m_generation = 0
private

Definition at line 164 of file StackFrameRecognizer.h.

Referenced by BumpGeneration(), and GetGeneration().

◆ m_recognizers

std::deque<RegisteredEntry> lldb_private::StackFrameRecognizerManager::m_recognizers
private

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