LLDB mainline
|
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, bool first_instruction_only=true) |
void | AddRecognizer (lldb::StackFrameRecognizerSP recognizer, lldb::RegularExpressionSP module, lldb::RegularExpressionSP symbol, bool first_instruction_only=true) |
void | ForEach (std::function< void(uint32_t recognizer_id, std::string recognizer_name, std::string module, llvm::ArrayRef< ConstString > symbols, bool regexp)> const &callback) |
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< RegisteredEntry > | m_recognizers |
uint16_t | m_generation |
Class that provides a registry of known stack frame recognizers.
Definition at line 106 of file StackFrameRecognizer.h.
void StackFrameRecognizerManager::AddRecognizer | ( | lldb::StackFrameRecognizerSP | recognizer, |
ConstString | module, | ||
llvm::ArrayRef< ConstString > | symbols, | ||
bool | first_instruction_only = true |
||
) |
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().
void StackFrameRecognizerManager::AddRecognizer | ( | lldb::StackFrameRecognizerSP | recognizer, |
lldb::RegularExpressionSP | module, | ||
lldb::RegularExpressionSP | symbol, | ||
bool | first_instruction_only = true |
||
) |
Definition at line 72 of file StackFrameRecognizer.cpp.
References BumpGeneration(), and m_recognizers.
|
private |
Increase the generation counter.
Definition at line 57 of file StackFrameRecognizer.cpp.
References m_generation.
Referenced by AddRecognizer(), RemoveAllRecognizers(), and RemoveRecognizerWithID().
void StackFrameRecognizerManager::ForEach | ( | std::function< void(uint32_t recognizer_id, std::string recognizer_name, std::string module, llvm::ArrayRef< ConstString > symbols, bool regexp)> const & | callback | ) |
Definition at line 81 of file StackFrameRecognizer.cpp.
References m_recognizers.
Referenced by CommandObjectFrameRecognizerList::DoExecute(), and CommandObjectFrameRecognizerDelete::HandleArgumentCompletion().
|
inline |
Returns a number that changes whenever the list of recognizers has been modified.
Definition at line 131 of file StackFrameRecognizer.h.
References m_generation.
StackFrameRecognizerSP StackFrameRecognizerManager::GetRecognizerForFrame | ( | lldb::StackFrameSP | frame | ) |
Definition at line 125 of file StackFrameRecognizer.cpp.
References lldb_private::Symbol::GetAddress(), lldb_private::SymbolContext::GetFunctionName(), lldb_private::ConstString::GetStringRef(), m_recognizers, lldb_private::SymbolContext::module_sp, and lldb_private::SymbolContext::symbol.
Referenced by CommandObjectFrameRecognizerInfo::DoExecute(), and RecognizeFrame().
RecognizedStackFrameSP StackFrameRecognizerManager::RecognizeFrame | ( | lldb::StackFrameSP | frame | ) |
Definition at line 166 of file StackFrameRecognizer.cpp.
References GetRecognizerForFrame().
void StackFrameRecognizerManager::RemoveAllRecognizers | ( | ) |
Definition at line 119 of file StackFrameRecognizer.cpp.
References BumpGeneration(), and m_recognizers.
Referenced by CommandObjectFrameRecognizerClear::DoExecute(), and CommandObjectFrameRecognizerDelete::DoExecute().
bool StackFrameRecognizerManager::RemoveRecognizerWithID | ( | uint32_t | recognizer_id | ) |
Definition at line 104 of file StackFrameRecognizer.cpp.
References BumpGeneration(), m_recognizers, and lldb_private::StackFrameRecognizerManager::RegisteredEntry::recognizer_id.
|
private |
Definition at line 149 of file StackFrameRecognizer.h.
Referenced by BumpGeneration(), and GetGeneration().
|
private |
Definition at line 148 of file StackFrameRecognizer.h.
Referenced by AddRecognizer(), ForEach(), GetRecognizerForFrame(), RemoveAllRecognizers(), and RemoveRecognizerWithID().