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