1 //===-- AddressResolverName.h -----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_AddressResolverName_h_
11 #define liblldb_AddressResolverName_h_
13 #include "lldb/Core/AddressResolver.h"
14 #include "lldb/Core/SearchFilter.h" // for Searcher, Searcher::Call...
15 #include "lldb/Utility/ConstString.h" // for ConstString
16 #include "lldb/Utility/RegularExpression.h"
17 #include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN
19 namespace lldb_private {
22 namespace lldb_private {
25 namespace lldb_private {
29 namespace lldb_private {
31 //----------------------------------------------------------------------
32 /// @class AddressResolverName AddressResolverName.h
33 /// "lldb/Core/AddressResolverName.h"
34 /// @brief This class finds addresses for a given function name, either by exact
36 /// or by regular expression.
37 //----------------------------------------------------------------------
39 class AddressResolverName : public AddressResolver {
41 AddressResolverName(const char *func_name,
42 AddressResolver::MatchType type = Exact);
44 // Creates a function breakpoint by regular expression. Takes over control of
45 // the lifespan of func_regex.
46 AddressResolverName(RegularExpression &func_regex);
48 AddressResolverName(const char *class_name, const char *method,
49 AddressResolver::MatchType type);
51 ~AddressResolverName() override;
53 Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
54 SymbolContext &context, Address *addr,
55 bool containing) override;
57 Searcher::Depth GetDepth() override;
59 void GetDescription(Stream *s) override;
62 ConstString m_func_name;
63 ConstString m_class_name; // FIXME: Not used yet. The idea would be to stop
64 // on methods of this class.
65 RegularExpression m_regex;
66 AddressResolver::MatchType m_match_type;
69 DISALLOW_COPY_AND_ASSIGN(AddressResolverName);
72 } // namespace lldb_private
74 #endif // liblldb_AddressResolverName_h_