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