LLDB mainline
BreakpointResolverFileLine.h
Go to the documentation of this file.
1//===-- BreakpointResolverFileLine.h ----------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_BREAKPOINT_BREAKPOINTRESOLVERFILELINE_H
10#define LLDB_BREAKPOINT_BREAKPOINTRESOLVERFILELINE_H
11
14#include <optional>
15
16namespace 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
24public:
26 const lldb::BreakpointSP &bkpt, lldb::addr_t offset, bool skip_prologue,
27 const SourceLocationSpec &location_spec,
28 std::optional<llvm::StringRef> removed_prefix_opt = std::nullopt);
29
32 Status &error);
33
35
36 ~BreakpointResolverFileLine() override = default;
37
39 SymbolContext &context,
40 Address *addr) override;
41
42 lldb::SearchDepth GetDepth() override;
43
44 void GetDescription(Stream *s) override;
45
46 void Dump(Stream *s) const override;
47
48 /// Methods for support type inquiry through isa, cast, and dyn_cast:
49 static inline bool classof(const BreakpointResolverFileLine *) {
50 return true;
51 }
52 static inline bool classof(const BreakpointResolver *V) {
54 }
55
57 CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override;
58
59protected:
60 void FilterContexts(SymbolContextList &sc_list);
61 void DeduceSourceMapping(const SymbolContextList &sc_list);
62
63 friend class Breakpoint;
66 // Any previously removed file path prefix by reverse source mapping.
67 // This is used to auto deduce source map if needed.
68 std::optional<llvm::StringRef> m_removed_prefix_opt;
69
70private:
74};
75
76} // namespace lldb_private
77
78#endif // LLDB_BREAKPOINT_BREAKPOINTRESOLVERFILELINE_H
static llvm::raw_ostream & error(Stream &strm)
A section + offset based address class.
Definition: Address.h:62
"lldb/Breakpoint/BreakpointResolverFileLine.h" This class sets breakpoints by file and line.
Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr) override
static lldb::BreakpointResolverSP CreateFromStructuredData(const StructuredData::Dictionary &data_dict, Status &error)
BreakpointResolverFileLine(const BreakpointResolverFileLine &)=delete
void GetDescription(Stream *s) override
Prints a canonical description for the breakpoint to the stream s.
void DeduceSourceMapping(const SymbolContextList &sc_list)
StructuredData::ObjectSP SerializeToStructuredData() override
static bool classof(const BreakpointResolverFileLine *)
Methods for support type inquiry through isa, cast, and dyn_cast:
std::optional< llvm::StringRef > m_removed_prefix_opt
static bool classof(const BreakpointResolver *V)
~BreakpointResolverFileLine() override=default
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
const BreakpointResolverFileLine & operator=(const BreakpointResolverFileLine &)=delete
lldb::BreakpointResolverSP CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override
General Outline: The BreakpointResolver is a Searcher.
unsigned getResolverID() const
getResolverID - Return an ID for the concrete type of this object.
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
Definition: Breakpoint.h:81
General Outline: Provides the callback and search depth for the SearchFilter search.
Definition: SearchFilter.h:83
"lldb/Core/SourceLocationSpec.h" A source location specifier class.
An error handling class.
Definition: Status.h:115
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
std::shared_ptr< Object > ObjectSP
Defines a list of symbol context objects.
Defines a symbol context baton that can be handed other debug core functions.
Definition: SymbolContext.h:34
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::BreakpointResolver > BreakpointResolverSP
Definition: lldb-forward.h:328
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
Definition: lldb-forward.h:321
uint64_t addr_t
Definition: lldb-types.h:80