File indexing completed on 2026-05-10 08:42:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef LLDB_BREAKPOINT_BREAKPOINTRESOLVERFILEREGEX_H
0011 #define LLDB_BREAKPOINT_BREAKPOINTRESOLVERFILEREGEX_H
0012
0013 #include <set>
0014 #include "lldb/Breakpoint/BreakpointResolver.h"
0015 #include "lldb/Utility/ConstString.h"
0016
0017 namespace lldb_private {
0018
0019
0020
0021
0022
0023
0024 class BreakpointResolverFileRegex : public BreakpointResolver {
0025 public:
0026 BreakpointResolverFileRegex(
0027 const lldb::BreakpointSP &bkpt, RegularExpression regex,
0028 const std::unordered_set<std::string> &func_name_set, bool exact_match);
0029
0030 static lldb::BreakpointResolverSP
0031 CreateFromStructuredData(const StructuredData::Dictionary &options_dict,
0032 Status &error);
0033
0034 StructuredData::ObjectSP SerializeToStructuredData() override;
0035
0036 ~BreakpointResolverFileRegex() override = default;
0037
0038 Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
0039 SymbolContext &context,
0040 Address *addr) override;
0041
0042 lldb::SearchDepth GetDepth() override;
0043
0044 void GetDescription(Stream *s) override;
0045
0046 void Dump(Stream *s) const override;
0047
0048 void AddFunctionName(const char *func_name);
0049
0050
0051 static inline bool classof(const BreakpointResolverFileRegex *) {
0052 return true;
0053 }
0054 static inline bool classof(const BreakpointResolver *V) {
0055 return V->getResolverID() == BreakpointResolver::FileRegexResolver;
0056 }
0057
0058 lldb::BreakpointResolverSP
0059 CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override;
0060
0061 protected:
0062 friend class Breakpoint;
0063 RegularExpression
0064 m_regex;
0065 bool m_exact_match;
0066
0067 std::unordered_set<std::string> m_function_names;
0068
0069
0070
0071 private:
0072 BreakpointResolverFileRegex(const BreakpointResolverFileRegex &) = delete;
0073 const BreakpointResolverFileRegex &
0074 operator=(const BreakpointResolverFileRegex &) = delete;
0075 };
0076
0077 }
0078
0079 #endif