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 
15 namespace lldb_private {
16 
17 /// \class BreakpointResolverFileLine BreakpointResolverFileLine.h
18 /// "lldb/Breakpoint/BreakpointResolverFileLine.h" This class sets breakpoints
19 /// by file and line. Optionally, it will look for inlined instances of the
20 /// file and line specification.
21 
23 public:
24  BreakpointResolverFileLine(const lldb::BreakpointSP &bkpt,
25  lldb::addr_t offset, bool skip_prologue,
26  const SourceLocationSpec &location_spec);
27 
28  static BreakpointResolver *
29  CreateFromStructuredData(const lldb::BreakpointSP &bkpt,
30  const StructuredData::Dictionary &data_dict,
31  Status &error);
32 
34 
35  ~BreakpointResolverFileLine() override = default;
36 
38  SymbolContext &context,
39  Address *addr) override;
40 
41  lldb::SearchDepth GetDepth() override;
42 
43  void GetDescription(Stream *s) override;
44 
45  void Dump(Stream *s) const override;
46 
47  /// Methods for support type inquiry through isa, cast, and dyn_cast:
48  static inline bool classof(const BreakpointResolverFileLine *) {
49  return true;
50  }
51  static inline bool classof(const BreakpointResolver *V) {
53  }
54 
55  lldb::BreakpointResolverSP
56  CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override;
57 
58 protected:
59  void FilterContexts(SymbolContextList &sc_list, bool is_relative);
60 
61  friend class Breakpoint;
64 
65 private:
68  operator=(const BreakpointResolverFileLine &) = delete;
69 };
70 
71 } // namespace lldb_private
72 
73 #endif // LLDB_BREAKPOINT_BREAKPOINTRESOLVERFILELINE_H
lldb_private::BreakpointResolverFileLine::~BreakpointResolverFileLine
~BreakpointResolverFileLine() override=default
lldb_private::BreakpointResolverFileLine::SearchCallback
Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr) override
Definition: BreakpointResolverFileLine.cpp:209
lldb_private::StructuredData::Dictionary
Definition: StructuredData.h:352
lldb_private::BreakpointResolverFileLine::CreateFromStructuredData
static BreakpointResolver * CreateFromStructuredData(const lldb::BreakpointSP &bkpt, const StructuredData::Dictionary &data_dict, Status &error)
Definition: BreakpointResolverFileLine.cpp:28
lldb::SearchDepth
SearchDepth
Definition: lldb-enumerations.h:283
lldb_private::BreakpointResolverFileLine::GetDepth
lldb::SearchDepth GetDepth() override
Definition: BreakpointResolverFileLine.cpp:267
lldb_private::SourceLocationSpec
Definition: SourceLocationSpec.h:27
lldb_private::BreakpointResolverFileLine::BreakpointResolverFileLine
BreakpointResolverFileLine(const lldb::BreakpointSP &bkpt, lldb::addr_t offset, bool skip_prologue, const SourceLocationSpec &location_spec)
lldb_private::BreakpointResolverFileLine
Definition: BreakpointResolverFileLine.h:22
BreakpointResolver.h
lldb_private::SymbolContextList
Definition: SymbolContext.h:379
lldb_private::BreakpointResolverFileLine::classof
static bool classof(const BreakpointResolverFileLine *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: BreakpointResolverFileLine.h:48
lldb_private::BreakpointResolverFileLine::operator=
const BreakpointResolverFileLine & operator=(const BreakpointResolverFileLine &)=delete
lldb_private::Stream
Definition: Stream.h:28
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::SymbolContext
Definition: SymbolContext.h:33
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::BreakpointResolverFileLine::m_skip_prologue
bool m_skip_prologue
Definition: BreakpointResolverFileLine.h:63
SourceLocationSpec.h
lldb_private::SearchFilter
General Outline: Provides the callback and search depth for the SearchFilter search.
Definition: SearchFilter.h:83
lldb_private::BreakpointResolverFileLine::SerializeToStructuredData
StructuredData::ObjectSP SerializeToStructuredData() override
Definition: BreakpointResolverFileLine.cpp:93
lldb_private::BreakpointResolver::FileLineResolver
@ FileLineResolver
Definition: BreakpointResolver.h:128
lldb_private::StructuredData::ObjectSP
std::shared_ptr< Object > ObjectSP
Definition: StructuredData.h:59
lldb_private::BreakpointResolverFileLine::CopyForBreakpoint
lldb::BreakpointResolverSP CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override
Definition: BreakpointResolverFileLine.cpp:284
lldb_private::Searcher::CallbackReturn
CallbackReturn
Definition: SearchFilter.h:44
lldb_private::BreakpointResolverFileLine::m_location_spec
SourceLocationSpec m_location_spec
Definition: BreakpointResolverFileLine.h:62
lldb_private::BreakpointResolverFileLine::FilterContexts
void FilterContexts(SymbolContextList &sc_list, bool is_relative)
Definition: BreakpointResolverFileLine.cpp:121
lldb_private::BreakpointResolver
General Outline: The BreakpointResolver is a Searcher.
Definition: BreakpointResolver.h:35
lldb_private::Status
Definition: Status.h:44
lldb_private::Address
Definition: Address.h:59
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::BreakpointResolverFileLine::GetDescription
void GetDescription(Stream *s) override
Prints a canonical description for the breakpoint to the stream s.
Definition: BreakpointResolverFileLine.cpp:271
lldb_private::BreakpointResolverFileLine::Dump
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
Definition: BreakpointResolverFileLine.cpp:281
lldb_private::Breakpoint
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
Definition: Breakpoint.h:79
lldb_private::BreakpointResolverFileLine::classof
static bool classof(const BreakpointResolver *V)
Definition: BreakpointResolverFileLine.h:51
lldb_private::BreakpointResolver::getResolverID
unsigned getResolverID() const
getResolverID - Return an ID for the concrete type of this object.
Definition: BreakpointResolver.h:145