]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
Update our device tree files to a Linux 4.10
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / 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
23 /// "lldb/Breakpoint/BreakpointResolverFileLine.h"
24 /// @brief This class sets breakpoints by file and line.  Optionally, it will
25 /// look for inlined
26 /// instances of the file and line specification.
27 //----------------------------------------------------------------------
28
29 class BreakpointResolverFileLine : public BreakpointResolver {
30 public:
31   BreakpointResolverFileLine(Breakpoint *bkpt, const FileSpec &resolver,
32                              uint32_t line_no, lldb::addr_t m_offset,
33                              bool check_inlines, bool skip_prologue,
34                              bool exact_match);
35
36   static BreakpointResolver *
37   CreateFromStructuredData(Breakpoint *bkpt,
38                            const StructuredData::Dictionary &data_dict,
39                            Error &error);
40
41   StructuredData::ObjectSP SerializeToStructuredData() override;
42
43   ~BreakpointResolverFileLine() override;
44
45   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
46                                           SymbolContext &context, Address *addr,
47                                           bool containing) override;
48
49   Searcher::Depth GetDepth() override;
50
51   void GetDescription(Stream *s) override;
52
53   void 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 *) {
57     return true;
58   }
59   static inline bool classof(const BreakpointResolver *V) {
60     return V->getResolverID() == BreakpointResolver::FileLineResolver;
61   }
62
63   lldb::BreakpointResolverSP 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
70                   // functions or not.
71   bool m_skip_prologue;
72   bool m_exact_match;
73
74 private:
75   DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileLine);
76 };
77
78 } // namespace lldb_private
79
80 #endif // liblldb_BreakpointResolverFileLine_h_