]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Core/AddressResolverName.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / include / lldb / Core / AddressResolverName.h
1 //===-- AddressResolverName.h -----------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_AddressResolverName_h_
11 #define liblldb_AddressResolverName_h_
12
13 // Project includes
14
15 #include "lldb/Core/AddressResolver.h"
16 #include "lldb/Core/RegularExpression.h"
17
18 namespace lldb_private {
19
20 //----------------------------------------------------------------------
21 /// @class AddressResolverName AddressResolverName.h
22 /// "lldb/Core/AddressResolverName.h"
23 /// @brief This class finds addresses for a given function name, either by exact
24 /// match
25 /// or by regular expression.
26 //----------------------------------------------------------------------
27
28 class AddressResolverName : public AddressResolver {
29 public:
30   AddressResolverName(const char *func_name,
31                       AddressResolver::MatchType type = Exact);
32
33   // Creates a function breakpoint by regular expression.  Takes over control of
34   // the lifespan of func_regex.
35   AddressResolverName(RegularExpression &func_regex);
36
37   AddressResolverName(const char *class_name, const char *method,
38                       AddressResolver::MatchType type);
39
40   ~AddressResolverName() override;
41
42   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
43                                           SymbolContext &context, Address *addr,
44                                           bool containing) override;
45
46   Searcher::Depth GetDepth() override;
47
48   void GetDescription(Stream *s) override;
49
50 protected:
51   ConstString m_func_name;
52   ConstString m_class_name; // FIXME: Not used yet.  The idea would be to stop
53                             // on methods of this class.
54   RegularExpression m_regex;
55   AddressResolver::MatchType m_match_type;
56
57 private:
58   DISALLOW_COPY_AND_ASSIGN(AddressResolverName);
59 };
60
61 } // namespace lldb_private
62
63 #endif // liblldb_AddressResolverName_h_