File indexing completed on 2026-05-10 08:42:43
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_BREAKPOINT_BREAKPOINTRESOLVERFILELINE_H
0010 #define LLDB_BREAKPOINT_BREAKPOINTRESOLVERFILELINE_H
0011
0012 #include "lldb/Breakpoint/BreakpointResolver.h"
0013 #include "lldb/Core/SourceLocationSpec.h"
0014 #include <optional>
0015
0016 namespace lldb_private {
0017
0018
0019
0020
0021
0022
0023 class BreakpointResolverFileLine : public BreakpointResolver {
0024 public:
0025 BreakpointResolverFileLine(
0026 const lldb::BreakpointSP &bkpt, lldb::addr_t offset, bool skip_prologue,
0027 const SourceLocationSpec &location_spec,
0028 std::optional<llvm::StringRef> removed_prefix_opt = std::nullopt);
0029
0030 static lldb::BreakpointResolverSP
0031 CreateFromStructuredData(const StructuredData::Dictionary &data_dict,
0032 Status &error);
0033
0034 StructuredData::ObjectSP SerializeToStructuredData() override;
0035
0036 ~BreakpointResolverFileLine() 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
0049 static inline bool classof(const BreakpointResolverFileLine *) {
0050 return true;
0051 }
0052 static inline bool classof(const BreakpointResolver *V) {
0053 return V->getResolverID() == BreakpointResolver::FileLineResolver;
0054 }
0055
0056 lldb::BreakpointResolverSP
0057 CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override;
0058
0059 protected:
0060 void FilterContexts(SymbolContextList &sc_list);
0061 void DeduceSourceMapping(const SymbolContextList &sc_list);
0062
0063 friend class Breakpoint;
0064 SourceLocationSpec m_location_spec;
0065 bool m_skip_prologue;
0066
0067
0068 std::optional<llvm::StringRef> m_removed_prefix_opt;
0069
0070 private:
0071 BreakpointResolverFileLine(const BreakpointResolverFileLine &) = delete;
0072 const BreakpointResolverFileLine &
0073 operator=(const BreakpointResolverFileLine &) = delete;
0074 };
0075
0076 }
0077
0078 #endif