]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Breakpoint/BreakpointResolverFileLine.h
Vendor import of lldb release_39 branch r276489:
[FreeBSD/FreeBSD.git] / include / lldb / Breakpoint / BreakpointResolverFileLine.h
1 //===-- BreakpointResolverFileLine.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_BreakpointResolverFileLine_h_
11 #define liblldb_BreakpointResolverFileLine_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Breakpoint/BreakpointResolver.h"
18
19 namespace lldb_private {
20
21 //----------------------------------------------------------------------
22 /// @class BreakpointResolverFileLine BreakpointResolverFileLine.h "lldb/Breakpoint/BreakpointResolverFileLine.h"
23 /// @brief This class sets breakpoints by file and line.  Optionally, it will look for inlined
24 /// instances of the file and line specification.
25 //----------------------------------------------------------------------
26
27 class BreakpointResolverFileLine :
28     public BreakpointResolver
29 {
30 public:
31     BreakpointResolverFileLine (Breakpoint *bkpt,
32                                 const FileSpec &resolver,
33                                 uint32_t line_no,
34                                 lldb::addr_t m_offset,
35                                 bool check_inlines,
36                                 bool skip_prologue,
37                                 bool exact_match);
38
39     ~BreakpointResolverFileLine() override;
40
41     Searcher::CallbackReturn
42     SearchCallback (SearchFilter &filter,
43                     SymbolContext &context,
44                     Address *addr,
45                     bool containing) override;
46
47     Searcher::Depth
48     GetDepth () override;
49
50     void
51     GetDescription (Stream *s) override;
52
53     void
54     Dump (Stream *s) const override;
55
56     /// Methods for support type inquiry through isa, cast, and dyn_cast:
57     static inline bool classof(const BreakpointResolverFileLine *) { return true; }
58     static inline bool classof(const BreakpointResolver *V) {
59         return V->getResolverID() == BreakpointResolver::FileLineResolver;
60     }
61
62     lldb::BreakpointResolverSP
63     CopyForBreakpoint (Breakpoint &breakpoint) override;
64
65 protected:
66     friend class Breakpoint;
67     FileSpec m_file_spec; // This is the file spec we are looking for.
68     uint32_t m_line_number; // This is the line number that we are looking for.
69     bool m_inlines; // This determines whether the resolver looks for inlined functions or not.
70     bool m_skip_prologue;
71     bool m_exact_match;
72
73 private:
74     DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileLine);
75 };
76
77 } // namespace lldb_private
78
79 #endif // liblldb_BreakpointResolverFileLine_h_