1 //===-- BreakpointResolverFileLine.h ----------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_BreakpointResolverFileLine_h_
11 #define liblldb_BreakpointResolverFileLine_h_
15 // Other libraries and framework includes
17 #include "lldb/Breakpoint/BreakpointResolver.h"
19 namespace lldb_private {
21 //----------------------------------------------------------------------
22 /// @class BreakpointResolverFileLine BreakpointResolverFileLine.h
23 /// "lldb/Breakpoint/BreakpointResolverFileLine.h"
24 /// @brief This class sets breakpoints by file and line. Optionally, it will
26 /// instances of the file and line specification.
27 //----------------------------------------------------------------------
29 class BreakpointResolverFileLine : public BreakpointResolver {
31 BreakpointResolverFileLine(Breakpoint *bkpt, const FileSpec &resolver,
32 uint32_t line_no, lldb::addr_t m_offset,
33 bool check_inlines, bool skip_prologue,
36 static BreakpointResolver *
37 CreateFromStructuredData(Breakpoint *bkpt,
38 const StructuredData::Dictionary &data_dict,
41 StructuredData::ObjectSP SerializeToStructuredData() override;
43 ~BreakpointResolverFileLine() override;
45 Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
46 SymbolContext &context, Address *addr,
47 bool containing) override;
49 Searcher::Depth GetDepth() override;
51 void GetDescription(Stream *s) override;
53 void Dump(Stream *s) const override;
55 /// Methods for support type inquiry through isa, cast, and dyn_cast:
56 static inline bool classof(const BreakpointResolverFileLine *) {
59 static inline bool classof(const BreakpointResolver *V) {
60 return V->getResolverID() == BreakpointResolver::FileLineResolver;
63 lldb::BreakpointResolverSP CopyForBreakpoint(Breakpoint &breakpoint) override;
66 void FilterContexts(SymbolContextList &sc_list);
68 friend class Breakpoint;
69 FileSpec m_file_spec; // This is the file spec we are looking for.
70 uint32_t m_line_number; // This is the line number that we are looking for.
71 bool m_inlines; // This determines whether the resolver looks for inlined
77 DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileLine);
80 } // namespace lldb_private
82 #endif // liblldb_BreakpointResolverFileLine_h_