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" This class sets breakpoints
24 /// by file and line. Optionally, it will look for inlined instances of the
25 /// file and line specification.
26 //----------------------------------------------------------------------
28 class BreakpointResolverFileLine : public BreakpointResolver {
30 BreakpointResolverFileLine(Breakpoint *bkpt, const FileSpec &resolver,
31 uint32_t line_no, lldb::addr_t m_offset,
32 bool check_inlines, bool skip_prologue,
35 static BreakpointResolver *
36 CreateFromStructuredData(Breakpoint *bkpt,
37 const StructuredData::Dictionary &data_dict,
40 StructuredData::ObjectSP SerializeToStructuredData() override;
42 ~BreakpointResolverFileLine() override;
44 Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
45 SymbolContext &context, Address *addr,
46 bool containing) override;
48 Searcher::Depth GetDepth() override;
50 void GetDescription(Stream *s) override;
52 void Dump(Stream *s) const override;
54 /// Methods for support type inquiry through isa, cast, and dyn_cast:
55 static inline bool classof(const BreakpointResolverFileLine *) {
58 static inline bool classof(const BreakpointResolver *V) {
59 return V->getResolverID() == BreakpointResolver::FileLineResolver;
62 lldb::BreakpointResolverSP CopyForBreakpoint(Breakpoint &breakpoint) override;
65 void FilterContexts(SymbolContextList &sc_list, bool is_relative);
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
76 DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileLine);
79 } // namespace lldb_private
81 #endif // liblldb_BreakpointResolverFileLine_h_