#include "lldb/lldb-private-forward.h"
#include "lldb/lldb-public.h"
+#include <vector>
+
namespace lldb_private {
/// \class RecognizedStackFrame
operator=(const ScriptedStackFrameRecognizer &) = delete;
};
-/// \class StackFrameRecognizerManager
-///
-/// Static class that provides a registry of known stack frame recognizers.
-/// Has static methods to add, enumerate, remove, query and invoke recognizers.
-
+/// Class that provides a registry of known stack frame recognizers.
class StackFrameRecognizerManager {
public:
- static void AddRecognizer(lldb::StackFrameRecognizerSP recognizer,
- ConstString module,
- llvm::ArrayRef<ConstString> symbols,
- bool first_instruction_only = true);
+ 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);
- static 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);
- static 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);
- static bool RemoveRecognizerWithID(uint32_t recognizer_id);
+ void RemoveAllRecognizers();
- static void RemoveAllRecognizers();
+ lldb::StackFrameRecognizerSP GetRecognizerForFrame(lldb::StackFrameSP frame);
- static lldb::StackFrameRecognizerSP GetRecognizerForFrame(
- lldb::StackFrameSP frame);
+ lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame);
+
+private:
+ struct RegisteredEntry {
+ uint32_t recognizer_id;
+ bool deleted;
+ lldb::StackFrameRecognizerSP recognizer;
+ bool is_regexp;
+ ConstString module;
+ lldb::RegularExpressionSP module_regexp;
+ std::vector<ConstString> symbols;
+ lldb::RegularExpressionSP symbol_regexp;
+ bool first_instruction_only;
+ };
- static lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame);
+ std::deque<RegisteredEntry> m_recognizers;
};
/// \class ValueObjectRecognizerSynthesizedValue
void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp);
+ StackFrameRecognizerManager &GetFrameRecognizerManager() {
+ return *m_frame_recognizer_manager_up;
+ }
+
protected:
/// Implementing of ModuleList::Notifier.
bool m_suppress_stop_hooks;
bool m_is_dummy_target;
unsigned m_next_persistent_variable_index = 0;
+ /// Stores the frame recognizers of this target.
+ lldb::StackFrameRecognizerManagerUP m_frame_recognizer_manager_up;
static void ImageSearchPathsChanged(const PathMappingList &path_list,
void *baton);
typedef std::shared_ptr<lldb_private::StackFrameList> StackFrameListSP;
typedef std::shared_ptr<lldb_private::StackFrameRecognizer>
StackFrameRecognizerSP;
+typedef std::unique_ptr<lldb_private::StackFrameRecognizerManager>
+ StackFrameRecognizerManagerUP;
typedef std::shared_ptr<lldb_private::StopInfo> StopInfoSP;
typedef std::shared_ptr<lldb_private::StoppointLocation> StoppointLocationSP;
typedef std::shared_ptr<lldb_private::Stream> StreamSP;
RegularExpressionSP(new RegularExpression(m_options.m_module));
auto func =
RegularExpressionSP(new RegularExpression(m_options.m_symbols.front()));
- StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, func);
+ GetSelectedOrDummyTarget().GetFrameRecognizerManager().AddRecognizer(
+ recognizer_sp, module, func);
} else {
auto module = ConstString(m_options.m_module);
std::vector<ConstString> symbols(m_options.m_symbols.begin(),
m_options.m_symbols.end());
- StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, symbols);
+ GetSelectedOrDummyTarget().GetFrameRecognizerManager().AddRecognizer(
+ recognizer_sp, module, symbols);
}
#endif
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- StackFrameRecognizerManager::RemoveAllRecognizers();
+ GetSelectedOrDummyTarget()
+ .GetFrameRecognizerManager()
+ .RemoveAllRecognizers();
result.SetStatus(eReturnStatusSuccessFinishResult);
return result.Succeeded();
}
if (request.GetCursorIndex() != 0)
return;
- StackFrameRecognizerManager::ForEach(
+ GetSelectedOrDummyTarget().GetFrameRecognizerManager().ForEach(
[&request](uint32_t rid, std::string rname, std::string module,
llvm::ArrayRef<lldb_private::ConstString> symbols,
bool regexp) {
return false;
}
- StackFrameRecognizerManager::RemoveAllRecognizers();
+ GetSelectedOrDummyTarget()
+ .GetFrameRecognizerManager()
+ .RemoveAllRecognizers();
result.SetStatus(eReturnStatusSuccessFinishResult);
return result.Succeeded();
}
return false;
}
- StackFrameRecognizerManager::RemoveRecognizerWithID(recognizer_id);
+ GetSelectedOrDummyTarget()
+ .GetFrameRecognizerManager()
+ .RemoveRecognizerWithID(recognizer_id);
result.SetStatus(eReturnStatusSuccessFinishResult);
return result.Succeeded();
}
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
bool any_printed = false;
- StackFrameRecognizerManager::ForEach(
+ GetSelectedOrDummyTarget().GetFrameRecognizerManager().ForEach(
[&result, &any_printed](
uint32_t recognizer_id, std::string name, std::string module,
llvm::ArrayRef<ConstString> symbols, bool regexp) {
return false;
}
- auto recognizer =
- StackFrameRecognizerManager::GetRecognizerForFrame(frame_sp);
+ auto recognizer = GetSelectedOrDummyTarget()
+ .GetFrameRecognizerManager()
+ .GetRecognizerForFrame(frame_sp);
Stream &output_stream = result.GetOutputStream();
output_stream.Printf("frame %d ", frame_index);
}
}
-static void RegisterObjCExceptionRecognizer();
+static void RegisterObjCExceptionRecognizer(Process *process);
AppleObjCRuntimeV2::AppleObjCRuntimeV2(Process *process,
const ModuleSP &objc_module_sp)
m_has_object_getClass =
(objc_module_sp->FindFirstSymbolWithNameAndType(
g_gdb_object_getClass, eSymbolTypeCode) != nullptr);
- RegisterObjCExceptionRecognizer();
+ RegisterObjCExceptionRecognizer(process);
}
bool AppleObjCRuntimeV2::GetDynamicTypeAndAddress(
};
};
-static void RegisterObjCExceptionRecognizer() {
- static llvm::once_flag g_once_flag;
- llvm::call_once(g_once_flag, []() {
- FileSpec module;
- ConstString function;
- std::tie(module, function) = AppleObjCRuntime::GetExceptionThrowLocation();
- std::vector<ConstString> symbols = {function};
- StackFrameRecognizerManager::AddRecognizer(
- StackFrameRecognizerSP(new ObjCExceptionThrowFrameRecognizer()),
- module.GetFilename(), symbols,
- /*first_instruction_only*/ true);
- });
+static void RegisterObjCExceptionRecognizer(Process *process) {
+ FileSpec module;
+ ConstString function;
+ std::tie(module, function) = AppleObjCRuntime::GetExceptionThrowLocation();
+ std::vector<ConstString> symbols = {function};
+
+ process->GetTarget().GetFrameRecognizerManager().AddRecognizer(
+ StackFrameRecognizerSP(new ObjCExceptionThrowFrameRecognizer()),
+ module.GetFilename(), symbols,
+ /*first_instruction_only*/ true);
}
}
void RegisterAssertFrameRecognizer(Process *process) {
- static llvm::once_flag g_once_flag;
- llvm::call_once(g_once_flag, [process]() {
- Target &target = process->GetTarget();
- llvm::Triple::OSType os = target.GetArchitecture().GetTriple().getOS();
- SymbolLocation location;
-
- if (!GetAbortLocation(os, location))
- return;
-
- StackFrameRecognizerManager::AddRecognizer(
- StackFrameRecognizerSP(new AssertFrameRecognizer()),
- location.module_spec.GetFilename(), location.symbols,
- /*first_instruction_only*/ false);
- });
+ Target &target = process->GetTarget();
+ llvm::Triple::OSType os = target.GetArchitecture().GetTriple().getOS();
+ SymbolLocation location;
+
+ if (!GetAbortLocation(os, location))
+ return;
+
+ target.GetFrameRecognizerManager().AddRecognizer(
+ StackFrameRecognizerSP(new AssertFrameRecognizer()),
+ location.module_spec.GetFilename(), location.symbols,
+ /*first_instruction_only*/ false);
}
} // namespace lldb_private
RecognizedStackFrameSP StackFrame::GetRecognizedFrame() {
if (!m_recognized_frame_sp) {
- m_recognized_frame_sp =
- StackFrameRecognizerManager::RecognizeFrame(CalculateStackFrame());
+ m_recognized_frame_sp = GetThread()
+ ->GetProcess()
+ ->GetTarget()
+ .GetFrameRecognizerManager()
+ .RecognizeFrame(CalculateStackFrame());
}
return m_recognized_frame_sp;
}
//
//===----------------------------------------------------------------------===//
-#include <vector>
+#include "lldb/Target/StackFrameRecognizer.h"
#include "lldb/Core/Module.h"
#include "lldb/Interpreter/ScriptInterpreter.h"
#include "lldb/Symbol/Symbol.h"
#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/StackFrameRecognizer.h"
#include "lldb/Utility/RegularExpression.h"
using namespace lldb;
new ScriptedRecognizedStackFrame(args_synthesized));
}
-class StackFrameRecognizerManagerImpl {
-public:
- void AddRecognizer(StackFrameRecognizerSP recognizer, ConstString module,
- llvm::ArrayRef<ConstString> symbols,
- bool first_instruction_only) {
- m_recognizers.push_front({(uint32_t)m_recognizers.size(), false, recognizer,
- false, module, RegularExpressionSP(), symbols,
- RegularExpressionSP(), first_instruction_only});
- }
-
- void AddRecognizer(StackFrameRecognizerSP recognizer,
- RegularExpressionSP module, RegularExpressionSP symbol,
- bool first_instruction_only) {
- m_recognizers.push_front(
- {(uint32_t)m_recognizers.size(), false, recognizer, true, ConstString(),
- module, std::vector<ConstString>(), symbol, first_instruction_only});
- }
-
- void ForEach(std::function<
- void(uint32_t recognized_id, std::string recognizer_name,
- std::string module, llvm::ArrayRef<ConstString> symbols,
- bool regexp)> const &callback) {
- for (auto entry : m_recognizers) {
- if (entry.is_regexp) {
- std::string module_name;
- std::string symbol_name;
-
- if (entry.module_regexp)
- module_name = entry.module_regexp->GetText().str();
- if (entry.symbol_regexp)
- symbol_name = entry.symbol_regexp->GetText().str();
-
- callback(entry.recognizer_id, entry.recognizer->GetName(), module_name,
- llvm::makeArrayRef(ConstString(symbol_name)), true);
-
- } else {
- callback(entry.recognizer_id, entry.recognizer->GetName(),
- entry.module.GetCString(), entry.symbols, false);
- }
- }
- }
-
- bool RemoveRecognizerWithID(uint32_t recognizer_id) {
- if (recognizer_id >= m_recognizers.size()) return false;
- if (m_recognizers[recognizer_id].deleted) return false;
- m_recognizers[recognizer_id].deleted = true;
- return true;
- }
+void StackFrameRecognizerManager::AddRecognizer(
+ StackFrameRecognizerSP recognizer, ConstString module,
+ llvm::ArrayRef<ConstString> symbols, bool first_instruction_only) {
+ m_recognizers.push_front({(uint32_t)m_recognizers.size(), false, recognizer,
+ false, module, RegularExpressionSP(), symbols,
+ RegularExpressionSP(), first_instruction_only});
+}
- void RemoveAllRecognizers() {
- m_recognizers.clear();
- }
+void StackFrameRecognizerManager::AddRecognizer(
+ StackFrameRecognizerSP recognizer, RegularExpressionSP module,
+ RegularExpressionSP symbol, bool first_instruction_only) {
+ m_recognizers.push_front(
+ {(uint32_t)m_recognizers.size(), false, recognizer, true, ConstString(),
+ module, std::vector<ConstString>(), symbol, first_instruction_only});
+}
- StackFrameRecognizerSP GetRecognizerForFrame(StackFrameSP frame) {
- const SymbolContext &symctx = frame->GetSymbolContext(
- eSymbolContextModule | eSymbolContextFunction | eSymbolContextSymbol);
- ConstString function_name = symctx.GetFunctionName();
- ModuleSP module_sp = symctx.module_sp;
- if (!module_sp) return StackFrameRecognizerSP();
- ConstString module_name = module_sp->GetFileSpec().GetFilename();
- Symbol *symbol = symctx.symbol;
- if (!symbol) return StackFrameRecognizerSP();
- Address start_addr = symbol->GetAddress();
- Address current_addr = frame->GetFrameCodeAddress();
-
- for (auto entry : m_recognizers) {
- if (entry.deleted) continue;
- if (entry.module)
- if (entry.module != module_name) continue;
+void StackFrameRecognizerManager::ForEach(
+ const std::function<void(uint32_t, std::string, std::string,
+ llvm::ArrayRef<ConstString>, bool)> &callback) {
+ for (auto entry : m_recognizers) {
+ if (entry.is_regexp) {
+ std::string module_name;
+ std::string symbol_name;
if (entry.module_regexp)
- if (!entry.module_regexp->Execute(module_name.GetStringRef())) continue;
-
- if (!entry.symbols.empty())
- if (!llvm::is_contained(entry.symbols, function_name))
- continue;
-
+ module_name = entry.module_regexp->GetText().str();
if (entry.symbol_regexp)
- if (!entry.symbol_regexp->Execute(function_name.GetStringRef()))
- continue;
+ symbol_name = entry.symbol_regexp->GetText().str();
- if (entry.first_instruction_only)
- if (start_addr != current_addr) continue;
+ callback(entry.recognizer_id, entry.recognizer->GetName(), module_name,
+ llvm::makeArrayRef(ConstString(symbol_name)), true);
- return entry.recognizer;
+ } else {
+ callback(entry.recognizer_id, entry.recognizer->GetName(),
+ entry.module.GetCString(), entry.symbols, false);
}
- return StackFrameRecognizerSP();
}
-
- RecognizedStackFrameSP RecognizeFrame(StackFrameSP frame) {
- auto recognizer = GetRecognizerForFrame(frame);
- if (!recognizer) return RecognizedStackFrameSP();
- return recognizer->RecognizeFrame(frame);
- }
-
- private:
- struct RegisteredEntry {
- uint32_t recognizer_id;
- bool deleted;
- StackFrameRecognizerSP recognizer;
- bool is_regexp;
- ConstString module;
- RegularExpressionSP module_regexp;
- std::vector<ConstString> symbols;
- RegularExpressionSP symbol_regexp;
- bool first_instruction_only;
- };
-
- std::deque<RegisteredEntry> m_recognizers;
-};
-
-StackFrameRecognizerManagerImpl &GetStackFrameRecognizerManagerImpl() {
- static StackFrameRecognizerManagerImpl instance =
- StackFrameRecognizerManagerImpl();
- return instance;
}
-void StackFrameRecognizerManager::AddRecognizer(
- StackFrameRecognizerSP recognizer, ConstString module,
- llvm::ArrayRef<ConstString> symbols, bool first_instruction_only) {
- GetStackFrameRecognizerManagerImpl().AddRecognizer(
- recognizer, module, symbols, first_instruction_only);
+bool StackFrameRecognizerManager::RemoveRecognizerWithID(
+ uint32_t recognizer_id) {
+ if (recognizer_id >= m_recognizers.size())
+ return false;
+ if (m_recognizers[recognizer_id].deleted)
+ return false;
+ m_recognizers[recognizer_id].deleted = true;
+ return true;
}
-void StackFrameRecognizerManager::AddRecognizer(
- StackFrameRecognizerSP recognizer, RegularExpressionSP module,
- RegularExpressionSP symbol, bool first_instruction_only) {
- GetStackFrameRecognizerManagerImpl().AddRecognizer(recognizer, module, symbol,
- first_instruction_only);
+void StackFrameRecognizerManager::RemoveAllRecognizers() {
+ m_recognizers.clear();
}
-void StackFrameRecognizerManager::ForEach(
- std::function<void(uint32_t recognized_id, std::string recognizer_name,
- std::string module, llvm::ArrayRef<ConstString> symbols,
- bool regexp)> const &callback) {
- GetStackFrameRecognizerManagerImpl().ForEach(callback);
-}
+StackFrameRecognizerSP
+StackFrameRecognizerManager::GetRecognizerForFrame(StackFrameSP frame) {
+ const SymbolContext &symctx = frame->GetSymbolContext(
+ eSymbolContextModule | eSymbolContextFunction | eSymbolContextSymbol);
+ ConstString function_name = symctx.GetFunctionName();
+ ModuleSP module_sp = symctx.module_sp;
+ if (!module_sp)
+ return StackFrameRecognizerSP();
+ ConstString module_name = module_sp->GetFileSpec().GetFilename();
+ Symbol *symbol = symctx.symbol;
+ if (!symbol)
+ return StackFrameRecognizerSP();
+ Address start_addr = symbol->GetAddress();
+ Address current_addr = frame->GetFrameCodeAddress();
-void StackFrameRecognizerManager::RemoveAllRecognizers() {
- GetStackFrameRecognizerManagerImpl().RemoveAllRecognizers();
-}
+ for (auto entry : m_recognizers) {
+ if (entry.deleted)
+ continue;
+ if (entry.module)
+ if (entry.module != module_name)
+ continue;
-bool StackFrameRecognizerManager::RemoveRecognizerWithID(uint32_t recognizer_id) {
- return GetStackFrameRecognizerManagerImpl().RemoveRecognizerWithID(recognizer_id);
-}
+ if (entry.module_regexp)
+ if (!entry.module_regexp->Execute(module_name.GetStringRef()))
+ continue;
-RecognizedStackFrameSP StackFrameRecognizerManager::RecognizeFrame(
- StackFrameSP frame) {
- return GetStackFrameRecognizerManagerImpl().RecognizeFrame(frame);
+ if (!entry.symbols.empty())
+ if (!llvm::is_contained(entry.symbols, function_name))
+ continue;
+
+ if (entry.symbol_regexp)
+ if (!entry.symbol_regexp->Execute(function_name.GetStringRef()))
+ continue;
+
+ if (entry.first_instruction_only)
+ if (start_addr != current_addr)
+ continue;
+
+ return entry.recognizer;
+ }
+ return StackFrameRecognizerSP();
}
-StackFrameRecognizerSP StackFrameRecognizerManager::GetRecognizerForFrame(
- lldb::StackFrameSP frame) {
- return GetStackFrameRecognizerManagerImpl().GetRecognizerForFrame(frame);
+RecognizedStackFrameSP
+StackFrameRecognizerManager::RecognizeFrame(StackFrameSP frame) {
+ auto recognizer = GetRecognizerForFrame(frame);
+ if (!recognizer)
+ return RecognizedStackFrameSP();
+ return recognizer->RecognizeFrame(frame);
}
#include "lldb/Target/Process.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/StackFrame.h"
+#include "lldb/Target/StackFrameRecognizer.h"
#include "lldb/Target/SystemRuntime.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadSpec.h"
m_source_manager_up(), m_stop_hooks(), m_stop_hook_next_id(0),
m_valid(true), m_suppress_stop_hooks(false),
m_is_dummy_target(is_dummy_target),
+ m_frame_recognizer_manager_up(
+ std::make_unique<StackFrameRecognizerManager>()),
m_stats_storage(static_cast<int>(StatisticKind::StatisticMax))
{
BreakpointName *new_bp_name = new BreakpointName(*bp_name_entry.second);
AddBreakpointName(new_bp_name);
}
+
+ m_frame_recognizer_manager_up = std::make_unique<StackFrameRecognizerManager>(
+ *target->m_frame_recognizer_manager_up);
}
void Target::Dump(Stream *s, lldb::DescriptionLevel description_level) {
self.expect("frame recognizer info 0",
substrs=['frame 0 is recognized by recognizer.MyFrameRecognizer'])
+ @skipUnlessDarwin
+ def test_frame_recognizer_target_specific(self):
+ self.build()
+ exe = self.getBuildArtifact("a.out")
+
+ # Clear internal & plugins recognizers that get initialized at launch
+ self.runCmd("frame recognizer clear")
+
+ # Create a target.
+ target, process, thread, _ = lldbutil.run_to_name_breakpoint(self, "foo",
+ exe_name = exe)
+
+ self.runCmd("command script import " + os.path.join(self.getSourceDir(), "recognizer.py"))
+
+ # Check that this doesn't contain our own FrameRecognizer somehow.
+ self.expect("frame recognizer list",
+ matching=False, substrs=['MyFrameRecognizer'])
+
+ # Add a frame recognizer in that target.
+ self.runCmd("frame recognizer add -l recognizer.MyFrameRecognizer -s a.out -n foo -n bar")
+
+ self.expect("frame recognizer list",
+ substrs=['recognizer.MyFrameRecognizer, module a.out, symbol foo, symbol bar'])
+
+ self.expect("frame recognizer info 0",
+ substrs=['frame 0 is recognized by recognizer.MyFrameRecognizer'])
+
+ # Create a second target. That one shouldn't have the frame recognizer.
+ target, process, thread, _ = lldbutil.run_to_name_breakpoint(self, "bar",
+ exe_name = exe)
+
+ self.expect("frame recognizer info 0",
+ substrs=['frame 0 not recognized by any recognizer'])
+
+ # Add a frame recognizer to the new target.
+ self.runCmd("frame recognizer add -l recognizer.MyFrameRecognizer -s a.out -n bar")
+
+ self.expect("frame recognizer list",
+ substrs=['recognizer.MyFrameRecognizer, module a.out, symbol bar'])
+
+ # Now the new target should also recognize the frame.
+ self.expect("frame recognizer info 0",
+ substrs=['frame 0 is recognized by recognizer.MyFrameRecognizer'])
+
@no_debug_info_test
def test_frame_recognizer_delete_invalid_arg(self):
self.expect("frame recognizer delete a", error=True,
std::string GetName() override { return "Dummy StackFrame Recognizer"; }
};
-void RegisterDummyStackFrameRecognizer() {
- static llvm::once_flag g_once_flag;
+void RegisterDummyStackFrameRecognizer(StackFrameRecognizerManager &manager) {
+ RegularExpressionSP module_regex_sp = nullptr;
+ RegularExpressionSP symbol_regex_sp(new RegularExpression("boom"));
- llvm::call_once(g_once_flag, []() {
- RegularExpressionSP module_regex_sp = nullptr;
- RegularExpressionSP symbol_regex_sp(new RegularExpression("boom"));
+ StackFrameRecognizerSP dummy_recognizer_sp(new DummyStackFrameRecognizer());
- StackFrameRecognizerSP dummy_recognizer_sp(new DummyStackFrameRecognizer());
-
- StackFrameRecognizerManager::AddRecognizer(
- dummy_recognizer_sp, module_regex_sp, symbol_regex_sp, false);
- });
+ manager.AddRecognizer(dummy_recognizer_sp, module_regex_sp, symbol_regex_sp,
+ false);
}
} // namespace
DebuggerSP debugger_sp = Debugger::CreateInstance();
ASSERT_TRUE(debugger_sp);
- RegisterDummyStackFrameRecognizer();
+ StackFrameRecognizerManager manager;
+
+ RegisterDummyStackFrameRecognizer(manager);
bool any_printed = false;
- StackFrameRecognizerManager::ForEach(
- [&any_printed](uint32_t recognizer_id, std::string name,
- std::string function, llvm::ArrayRef<ConstString> symbols,
- bool regexp) { any_printed = true; });
+ manager.ForEach([&any_printed](uint32_t recognizer_id, std::string name,
+ std::string function,
+ llvm::ArrayRef<ConstString> symbols,
+ bool regexp) { any_printed = true; });
EXPECT_TRUE(any_printed);
}