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
19namespace 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
27class BreakpointResolverFileRegex :
28    public BreakpointResolver
29{
30public:
31    BreakpointResolverFileRegex (Breakpoint *bkpt,
32                                RegularExpression &regex);
33
34    virtual
35    ~BreakpointResolverFileRegex ();
36
37    virtual Searcher::CallbackReturn
38    SearchCallback (SearchFilter &filter,
39                    SymbolContext &context,
40                    Address *addr,
41                    bool containing);
42
43    virtual Searcher::Depth
44    GetDepth ();
45
46    virtual void
47    GetDescription (Stream *s);
48
49    virtual void
50    Dump (Stream *s) const;
51
52    /// Methods for support type inquiry through isa, cast, and dyn_cast:
53    static inline bool classof(const BreakpointResolverFileRegex *) { return true; }
54    static inline bool classof(const BreakpointResolver *V) {
55        return V->getResolverID() == BreakpointResolver::FileRegexResolver;
56    }
57
58protected:
59    friend class Breakpoint;
60    RegularExpression m_regex; // This is the line expression that we are looking for.
61
62private:
63    DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileRegex);
64};
65
66} // namespace lldb_private
67
68#endif  // liblldb_BreakpointResolverFileRegex_h_
69