]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Breakpoint/BreakpointResolverFileLine.h
Import LLDB as of upstream SVN r225923 (git 2b588ecd)
[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                                 bool check_inlines,
35                                 bool skip_prologue);
36
37     virtual
38     ~BreakpointResolverFileLine ();
39
40     Searcher::CallbackReturn
41     SearchCallback (SearchFilter &filter,
42                     SymbolContext &context,
43                     Address *addr,
44                     bool containing) override;
45
46     Searcher::Depth
47     GetDepth () override;
48
49     void
50     GetDescription (Stream *s) override;
51
52     void
53     Dump (Stream *s) const override;
54
55     /// Methods for support type inquiry through isa, cast, and dyn_cast:
56     static inline bool classof(const BreakpointResolverFileLine *) { return true; }
57     static inline bool classof(const BreakpointResolver *V) {
58         return V->getResolverID() == BreakpointResolver::FileLineResolver;
59     }
60
61     lldb::BreakpointResolverSP
62     CopyForBreakpoint (Breakpoint &breakpoint) override;
63
64 protected:
65     friend class Breakpoint;
66     FileSpec m_file_spec; // This is the file spec we are looking for.
67     uint32_t m_line_number; // This is the line number that we are looking for.
68     bool m_inlines; // This determines whether the resolver looks for inlined functions or not.
69     bool m_skip_prologue;
70
71 private:
72     DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileLine);
73 };
74
75 } // namespace lldb_private
76
77 #endif  // liblldb_BreakpointResolverFileLine_h_