1 //===-- BreakpointResolverFileRegex.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_BreakpointResolverFileRegex_h_ 11 #define liblldb_BreakpointResolverFileRegex_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 BreakpointResolverFileRegex BreakpointResolverFileRegex.h "lldb/Breakpoint/BreakpointResolverFileRegex.h" 23 /// @brief This class sets breakpoints by file and line. Optionally, it will look for inlined 24 /// instances of the file and line specification. 25 //---------------------------------------------------------------------- 26 27 class BreakpointResolverFileRegex : 28 public BreakpointResolver 29 { 30 public: 31 BreakpointResolverFileRegex (Breakpoint *bkpt, 32 RegularExpression ®ex, 33 bool exact_match); 34 35 virtual 36 ~BreakpointResolverFileRegex (); 37 38 Searcher::CallbackReturn 39 SearchCallback (SearchFilter &filter, 40 SymbolContext &context, 41 Address *addr, 42 bool containing) override; 43 44 Searcher::Depth 45 GetDepth () override; 46 47 void 48 GetDescription (Stream *s) override; 49 50 void 51 Dump (Stream *s) const override; 52 53 /// Methods for support type inquiry through isa, cast, and dyn_cast: classof(const BreakpointResolverFileRegex *)54 static inline bool classof(const BreakpointResolverFileRegex *) { return true; } classof(const BreakpointResolver * V)55 static inline bool classof(const BreakpointResolver *V) { 56 return V->getResolverID() == BreakpointResolver::FileRegexResolver; 57 } 58 59 lldb::BreakpointResolverSP 60 CopyForBreakpoint (Breakpoint &breakpoint) override; 61 62 protected: 63 friend class Breakpoint; 64 RegularExpression m_regex; // This is the line expression that we are looking for. 65 bool m_exact_match; 66 67 private: 68 DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileRegex); 69 }; 70 71 } // namespace lldb_private 72 73 #endif // liblldb_BreakpointResolverFileRegex_h_ 74