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_
13 #include "lldb/Breakpoint/BreakpointResolver.h"
15 namespace lldb_private {
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 //----------------------------------------------------------------------
24 class BreakpointResolverFileLine : public BreakpointResolver {
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);
31 static BreakpointResolver *
32 CreateFromStructuredData(Breakpoint *bkpt,
33 const StructuredData::Dictionary &data_dict,
36 StructuredData::ObjectSP SerializeToStructuredData() override;
38 ~BreakpointResolverFileLine() override;
40 Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
41 SymbolContext &context, Address *addr,
42 bool containing) override;
44 lldb::SearchDepth GetDepth() override;
46 void GetDescription(Stream *s) override;
48 void Dump(Stream *s) const override;
50 /// Methods for support type inquiry through isa, cast, and dyn_cast:
51 static inline bool classof(const BreakpointResolverFileLine *) {
54 static inline bool classof(const BreakpointResolver *V) {
55 return V->getResolverID() == BreakpointResolver::FileLineResolver;
58 lldb::BreakpointResolverSP CopyForBreakpoint(Breakpoint &breakpoint) override;
61 void FilterContexts(SymbolContextList &sc_list, bool is_relative);
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.
73 DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileLine);
76 } // namespace lldb_private
78 #endif // liblldb_BreakpointResolverFileLine_h_