32 : m_interpreter(interpreter), m_python_class(pclass) {
46 for (
const auto &o : args->GetObjects())
59 n = (n + 1) & ((1 << 16) - 1);
65 llvm::ArrayRef<ConstString> symbols,
70 first_instruction_only,
true});
77 bool first_instruction_only) {
80 symbol, symbol_mangling, first_instruction_only,
86 const std::function<
void(
87 uint32_t,
bool, std::string, std::string, llvm::ArrayRef<ConstString>,
90 if (entry.is_regexp) {
91 std::string module_name;
92 std::string symbol_name;
94 if (entry.module_regexp)
95 module_name = entry.module_regexp->GetText().str();
96 if (entry.symbol_regexp)
97 symbol_name = entry.symbol_regexp->GetText().str();
99 callback(entry.recognizer_id, entry.enabled, entry.recognizer->GetName(),
100 module_name, llvm::ArrayRef(
ConstString(symbol_name)),
101 entry.symbol_mangling,
true);
103 callback(entry.recognizer_id, entry.enabled, entry.recognizer->GetName(),
104 entry.module.GetCString(), entry.symbols, entry.symbol_mangling,
118 found->enabled = enabled;
124 uint32_t recognizer_id) {
144 eSymbolContextModule | eSymbolContextFunction | eSymbolContextSymbol);
148 ConstString module_name = module_sp->GetFileSpec().GetFilename();
153 Address current_addr = frame->GetFrameCodeAddress();
160 if (entry.module != module_name)
163 if (entry.module_regexp)
164 if (!entry.module_regexp->Execute(module_name.
GetStringRef()))
169 if (!entry.symbols.empty())
170 if (!llvm::is_contained(entry.symbols, function_name))
173 if (entry.symbol_regexp)
174 if (!entry.symbol_regexp->Execute(function_name.
GetStringRef()))
177 if (entry.first_instruction_only)
178 if (start_addr != current_addr)
181 return entry.recognizer;
191 return recognizer->RecognizeFrame(frame);
ScriptedRecognizedStackFrame(ValueObjectListSP args, bool hidden)
bool ShouldHide() override
Controls whether this frame should be filtered out when displaying backtraces, for example.
A section + offset based address class.
A uniqued constant string class.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
This class provides extra information about a stack frame that was provided by a specific stack frame...
lldb::ValueObjectListSP m_arguments
virtual lldb::ValueObjectListSP GetRecognizedArguments(const StructuredData::ObjectSP &implementor, lldb::StackFrameSP frame_sp)
virtual StructuredData::GenericSP CreateFrameRecognizer(const char *class_name)
virtual bool ShouldHide(const StructuredData::ObjectSP &implementor, lldb::StackFrameSP frame_sp)
ScriptedStackFrameRecognizer(lldb_private::ScriptInterpreter *interpreter, const char *pclass)
lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame) override
lldb_private::StructuredData::ObjectSP m_python_object_sp
std::string m_python_class
lldb_private::ScriptInterpreter * m_interpreter
void BumpGeneration()
Increase the generation counter.
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 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)
lldb::StackFrameRecognizerSP GetRecognizerForFrame(lldb::StackFrameSP frame)
lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame)
bool RemoveRecognizerWithID(uint32_t recognizer_id)
void RemoveAllRecognizers()
bool SetEnabledForID(uint32_t recognizer_id, bool enabled)
std::deque< RegisteredEntry > m_recognizers
Defines a symbol context baton that can be handed other debug core functions.
ConstString GetFunctionName(Mangled::NamePreference preference=Mangled::ePreferDemangled) const
Find a name of the innermost function for the symbol context.
lldb::ModuleSP module_sp
The Module for a given query.
Symbol * symbol
The Symbol for a given query.
Address GetAddress() const
A collection of ValueObject values that.
static lldb::ValueObjectSP Create(ValueObject &parent, lldb::ValueType type)
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::RegularExpression > RegularExpressionSP
std::shared_ptr< lldb_private::ValueObjectList > ValueObjectListSP
std::shared_ptr< lldb_private::StackFrameRecognizer > StackFrameRecognizerSP
std::shared_ptr< lldb_private::Module > ModuleSP
@ eValueTypeVariableArgument
function argument variables