]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Core/AddressResolverName.h
Vendor import of stripped lldb trunk r256633:
[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 "lldb/Core/AddressResolverName.h"
22 /// @brief This class finds addresses for a given function name, either by exact match
23 /// or by regular expression.
24 //----------------------------------------------------------------------
25
26 class AddressResolverName:
27     public AddressResolver
28 {
29 public:
30
31     AddressResolverName (const char *func_name,
32                          AddressResolver::MatchType type = Exact);
33
34     // Creates a function breakpoint by regular expression.  Takes over control of the lifespan of func_regex.
35     AddressResolverName (RegularExpression &func_regex);
36
37     AddressResolverName (const char *class_name,
38                          const char *method,
39                          AddressResolver::MatchType type);
40
41     ~AddressResolverName () override;
42
43     Searcher::CallbackReturn
44     SearchCallback (SearchFilter &filter,
45                     SymbolContext &context,
46                     Address *addr,
47                     bool containing) override;
48
49     Searcher::Depth
50     GetDepth () override;
51
52     void
53     GetDescription (Stream *s) override;
54
55 protected:
56     ConstString m_func_name;
57     ConstString m_class_name;  // FIXME: Not used yet.  The idea would be to stop on methods of this class.
58     RegularExpression m_regex;
59     AddressResolver::MatchType m_match_type;
60
61 private:
62     DISALLOW_COPY_AND_ASSIGN(AddressResolverName);
63 };
64
65 } // namespace lldb_private
66
67 #endif // liblldb_AddressResolverName_h_