]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Core/AddressResolverFileLine.h
MFV r316931: 6268 zfs diff confused by moving a file to another directory
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Core / AddressResolverFileLine.h
1 //===-- AddressResolverFileLine.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_AddressResolverFileLine_h_
11 #define liblldb_AddressResolverFileLine_h_
12
13 #include "lldb/Core/AddressResolver.h"
14 #include "lldb/Core/SearchFilter.h" // for Searcher, Searcher::CallbackR...
15 #include "lldb/Utility/FileSpec.h"  // for FileSpec
16 #include "lldb/lldb-defines.h"      // for DISALLOW_COPY_AND_ASSIGN
17
18 #include <stdint.h> // for uint32_t
19
20 namespace lldb_private {
21 class Address;
22 }
23 namespace lldb_private {
24 class Stream;
25 }
26 namespace lldb_private {
27 class SymbolContext;
28 }
29
30 namespace lldb_private {
31
32 //----------------------------------------------------------------------
33 /// @class AddressResolverFileLine AddressResolverFileLine.h
34 /// "lldb/Core/AddressResolverFileLine.h"
35 /// @brief This class finds address for source file and line.  Optionally, it
36 /// will look for inlined
37 /// instances of the file and line specification.
38 //----------------------------------------------------------------------
39
40 class AddressResolverFileLine : public AddressResolver {
41 public:
42   AddressResolverFileLine(const FileSpec &resolver, uint32_t line_no,
43                           bool check_inlines);
44
45   ~AddressResolverFileLine() override;
46
47   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
48                                           SymbolContext &context, Address *addr,
49                                           bool containing) override;
50
51   Searcher::Depth GetDepth() override;
52
53   void GetDescription(Stream *s) override;
54
55 protected:
56   FileSpec m_file_spec;   // This is the file spec we are looking for.
57   uint32_t m_line_number; // This is the line number that we are looking for.
58   bool m_inlines; // This determines whether the resolver looks for inlined
59                   // functions or not.
60
61 private:
62   DISALLOW_COPY_AND_ASSIGN(AddressResolverFileLine);
63 };
64
65 } // namespace lldb_private
66
67 #endif // liblldb_AddressResolverFileLine_h_