LLDB  mainline
BreakpointResolverScripted.h
Go to the documentation of this file.
1 //===-- BreakpointResolverScripted.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_BREAKPOINTRESOLVERSCRIPTED_H
10 #define LLDB_BREAKPOINT_BREAKPOINTRESOLVERSCRIPTED_H
11 
12 #include "lldb/lldb-forward.h"
14 #include "lldb/Core/ModuleSpec.h"
15 
16 
17 namespace lldb_private {
18 
19 /// \class BreakpointResolverScripted BreakpointResolverScripted.h
20 /// "lldb/Breakpoint/BreakpointResolverScripted.h" This class sets breakpoints
21 /// on a given Address. This breakpoint only takes once, and then it won't
22 /// attempt to reset itself.
23 
25 public:
26  BreakpointResolverScripted(const lldb::BreakpointSP &bkpt,
27  const llvm::StringRef class_name,
28  lldb::SearchDepth depth,
29  StructuredDataImpl *args_data);
30 
31  ~BreakpointResolverScripted() override = default;
32 
33  static BreakpointResolver *
34  CreateFromStructuredData(const lldb::BreakpointSP &bkpt,
35  const StructuredData::Dictionary &options_dict,
36  Status &error);
37 
39 
41  SymbolContext &context,
42  Address *addr) override;
43 
44  lldb::SearchDepth GetDepth() override;
45 
46  void GetDescription(Stream *s) override;
47 
48  void Dump(Stream *s) const override;
49 
50  /// Methods for support type inquiry through isa, cast, and dyn_cast:
51  static inline bool classof(const BreakpointResolverScripted *) { return true; }
52  static inline bool classof(const BreakpointResolver *V) {
54  }
55 
56  lldb::BreakpointResolverSP
57  CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override;
58 
59 protected:
60  void NotifyBreakpointSet() override;
61 private:
62  void CreateImplementationIfNeeded(lldb::BreakpointSP bkpt);
64 
67  StructuredDataImpl *m_args_ptr; // We own this, but the implementation
68  // has to manage the UP (since that is
69  // how it gets stored in the
70  // SBStructuredData).
72 
75  operator=(const BreakpointResolverScripted &) = delete;
76 };
77 
78 } // namespace lldb_private
79 
80 #endif // LLDB_BREAKPOINT_BREAKPOINTRESOLVERSCRIPTED_H
lldb_private::BreakpointResolverScripted
Definition: BreakpointResolverScripted.h:24
lldb_private::StructuredData::Dictionary
Definition: StructuredData.h:352
lldb::SearchDepth
SearchDepth
Definition: lldb-enumerations.h:283
ModuleSpec.h
lldb_private::StructuredData::GenericSP
std::shared_ptr< Generic > GenericSP
Definition: StructuredData.h:68
lldb_private::BreakpointResolverScripted::m_depth
lldb::SearchDepth m_depth
Definition: BreakpointResolverScripted.h:66
lldb_private::BreakpointResolverScripted::BreakpointResolverScripted
BreakpointResolverScripted(const lldb::BreakpointSP &bkpt, const llvm::StringRef class_name, lldb::SearchDepth depth, StructuredDataImpl *args_data)
BreakpointResolver.h
lldb_private::Stream
Definition: Stream.h:28
lldb_private::SymbolContext
Definition: SymbolContext.h:33
lldb_private::BreakpointResolver::PythonResolver
@ PythonResolver
Definition: BreakpointResolver.h:132
lldb_private::BreakpointResolverScripted::classof
static bool classof(const BreakpointResolver *V)
Definition: BreakpointResolverScripted.h:52
lldb_private::BreakpointResolverScripted::operator=
const BreakpointResolverScripted & operator=(const BreakpointResolverScripted &)=delete
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::SearchFilter
General Outline: Provides the callback and search depth for the SearchFilter search.
Definition: SearchFilter.h:83
lldb_private::StructuredData::ObjectSP
std::shared_ptr< Object > ObjectSP
Definition: StructuredData.h:59
lldb_private::Searcher::CallbackReturn
CallbackReturn
Definition: SearchFilter.h:44
lldb_private::StructuredDataImpl
Definition: StructuredDataImpl.h:26
lldb_private::BreakpointResolverScripted::m_implementation_sp
StructuredData::GenericSP m_implementation_sp
Definition: BreakpointResolverScripted.h:71
lldb_private::BreakpointResolverScripted::GetScriptInterpreter
ScriptInterpreter * GetScriptInterpreter()
Definition: BreakpointResolverScripted.cpp:104
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::BreakpointResolverScripted::classof
static bool classof(const BreakpointResolverScripted *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: BreakpointResolverScripted.h:51
lldb_private::BreakpointResolver
General Outline: The BreakpointResolver is a Searcher.
Definition: BreakpointResolver.h:35
lldb_private::Status
Definition: Status.h:44
lldb_private::BreakpointResolverScripted::GetDescription
void GetDescription(Stream *s) override
Prints a canonical description for the breakpoint to the stream s.
Definition: BreakpointResolverScripted.cpp:135
lldb_private::Address
Definition: Address.h:59
lldb_private::BreakpointResolverScripted::SerializeToStructuredData
StructuredData::ObjectSP SerializeToStructuredData() override
Definition: BreakpointResolverScripted.cpp:91
lldb_private::BreakpointResolverScripted::Dump
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
Definition: BreakpointResolverScripted.cpp:150
lldb_private::BreakpointResolverScripted::SearchCallback
Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr) override
Definition: BreakpointResolverScripted.cpp:108
lldb_private::ScriptInterpreter
Definition: ScriptInterpreter.h:126
lldb-forward.h
lldb_private::BreakpointResolverScripted::m_args_ptr
StructuredDataImpl * m_args_ptr
Definition: BreakpointResolverScripted.h:67
lldb_private::BreakpointResolverScripted::CreateFromStructuredData
static BreakpointResolver * CreateFromStructuredData(const lldb::BreakpointSP &bkpt, const StructuredData::Dictionary &options_dict, Status &error)
Definition: BreakpointResolverScripted.cpp:63
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::BreakpointResolverScripted::~BreakpointResolverScripted
~BreakpointResolverScripted() override=default
lldb_private::BreakpointResolverScripted::m_class_name
std::string m_class_name
Definition: BreakpointResolverScripted.h:65
lldb_private::BreakpointResolverScripted::NotifyBreakpointSet
void NotifyBreakpointSet() override
Definition: BreakpointResolverScripted.cpp:58
lldb_private::BreakpointResolverScripted::CreateImplementationIfNeeded
void CreateImplementationIfNeeded(lldb::BreakpointSP bkpt)
Definition: BreakpointResolverScripted.cpp:37
lldb_private::BreakpointResolverScripted::CopyForBreakpoint
lldb::BreakpointResolverSP CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override
Definition: BreakpointResolverScripted.cpp:153
lldb_private::BreakpointResolverScripted::GetDepth
lldb::SearchDepth GetDepth() override
Definition: BreakpointResolverScripted.cpp:125
lldb_private::BreakpointResolver::getResolverID
unsigned getResolverID() const
getResolverID - Return an ID for the concrete type of this object.
Definition: BreakpointResolver.h:145