LLDB mainline
lldb_private::BreakpointResolverScripted Class Reference

"lldb/Breakpoint/BreakpointResolverScripted.h" This class sets breakpoints on a given Address. More...

#include <BreakpointResolverScripted.h>

Inheritance diagram for lldb_private::BreakpointResolverScripted:
[legend]

Public Member Functions

 BreakpointResolverScripted (const lldb::BreakpointSP &bkpt, const llvm::StringRef class_name, lldb::SearchDepth depth, const StructuredDataImpl &args_data)
 ~BreakpointResolverScripted () override=default
StructuredData::ObjectSP SerializeToStructuredData () override
Searcher::CallbackReturn SearchCallback (SearchFilter &filter, SymbolContext &context, Address *addr) override
lldb::SearchDepth GetDepth () override
void GetDescription (Stream *s) override
 Prints a canonical description for the breakpoint to the stream s.
void Dump (Stream *s) const override
 Standard "Dump" method. At present it does nothing.
lldb::BreakpointResolverSP CopyForBreakpoint (lldb::BreakpointSP &breakpoint) override
Public Member Functions inherited from lldb_private::BreakpointResolver
 BreakpointResolver (const lldb::BreakpointSP &bkpt, unsigned char resolverType, lldb::addr_t offset=0, bool offset_is_insn_count=false)
 The breakpoint resolver need to have a breakpoint for "ResolveBreakpoint to make sense.
 ~BreakpointResolver () override
 The Destructor is virtual, all significant breakpoint resolvers derive from this class.
void SetBreakpoint (const lldb::BreakpointSP &bkpt)
 This sets the breakpoint for this resolver.
lldb::BreakpointSP GetBreakpoint () const
 This gets the breakpoint for this resolver.
void SetOffset (lldb::addr_t offset)
 This updates the offset for this breakpoint.
lldb::addr_t GetOffset () const
lldb::addr_t GetOffsetIsInsnCount () const
virtual void ResolveBreakpoint (SearchFilter &filter)
 In response to this method the resolver scans all the modules in the breakpoint's target, and adds any new locations it finds.
virtual void ResolveBreakpointInModules (SearchFilter &filter, ModuleList &modules)
 In response to this method the resolver scans the modules in the module list modules, and adds any new locations it finds.
StructuredData::DictionarySP WrapOptionsDict (StructuredData::DictionarySP options_dict_sp)
unsigned getResolverID () const
 getResolverID - Return an ID for the concrete type of this object.
enum ResolverTy GetResolverTy ()
const char * GetResolverName ()
Public Member Functions inherited from lldb_private::Searcher
 Searcher ()
virtual ~Searcher ()

Static Public Member Functions

static lldb::BreakpointResolverSP CreateFromStructuredData (const StructuredData::Dictionary &options_dict, Status &error)
static bool classof (const BreakpointResolverScripted *)
 Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof (const BreakpointResolver *V)
Static Public Member Functions inherited from lldb_private::BreakpointResolver
static lldb::BreakpointResolverSP CreateFromStructuredData (const StructuredData::Dictionary &resolver_dict, Status &error)
 This section handles serializing and deserializing from StructuredData objects.
static const char * GetSerializationKey ()
static const char * GetSerializationSubclassKey ()
static const char * GetSerializationSubclassOptionsKey ()
static const char * ResolverTyToName (enum ResolverTy)
static ResolverTy NameToResolverTy (llvm::StringRef name)
static const char * GetKey (OptionNames enum_value)

Protected Member Functions

void NotifyBreakpointSet () override
Protected Member Functions inherited from lldb_private::BreakpointResolver
void SetSCMatchesByLine (SearchFilter &filter, SymbolContextList &sc_list, bool skip_prologue, llvm::StringRef log_ident, uint32_t line=0, std::optional< uint16_t > column=std::nullopt)
 Takes a symbol context list of matches which supposedly represent the same file and line number in a CU, and find the nearest actual line number that matches, and then filter down the matching addresses to unique entries, and skip the prologue if asked to do so, and then set breakpoint locations in this breakpoint for all the resultant addresses.
void SetSCMatchesByLine (SearchFilter &, SymbolContextList &, bool, const char *)=delete
lldb::BreakpointLocationSP AddLocation (Address loc_addr, bool *new_location=nullptr)

Private Member Functions

void CreateImplementationIfNeeded (lldb::BreakpointSP bkpt)
ScriptInterpreterGetScriptInterpreter ()
 BreakpointResolverScripted (const BreakpointResolverScripted &)=delete
const BreakpointResolverScriptedoperator= (const BreakpointResolverScripted &)=delete

Private Attributes

std::string m_class_name
lldb::SearchDepth m_depth
StructuredDataImpl m_args
Status m_error
lldb::ScriptedBreakpointInterfaceSP m_interface_sp

Additional Inherited Members

Public Types inherited from lldb_private::BreakpointResolver
enum  ResolverTy {
  FileLineResolver = 0 , AddressResolver , NameResolver , FileRegexResolver ,
  PythonResolver , ExceptionResolver , LastKnownResolverType = ExceptionResolver , UnknownResolver
}
 An enumeration for keeping track of the concrete subclass that is actually instantiated. More...
Public Types inherited from lldb_private::Searcher
enum  CallbackReturn { eCallbackReturnStop = 0 , eCallbackReturnContinue , eCallbackReturnPop }
Static Public Attributes inherited from lldb_private::BreakpointResolver
static const char * g_ty_to_name [LastKnownResolverType+2]
Protected Types inherited from lldb_private::BreakpointResolver
enum class  OptionNames : uint32_t {
  AddressOffset = 0 , ExactMatch , FileName , Inlines ,
  LanguageName , LineNumber , Column , ModuleName ,
  NameMaskArray , Offset , PythonClassName , RegexString ,
  ScriptArgs , SectionName , SearchDepth , SkipPrologue ,
  SymbolNameArray , LastOptionName
}
Static Protected Attributes inherited from lldb_private::BreakpointResolver
static const char * g_option_names [static_cast< uint32_t >(OptionNames::LastOptionName)]

Detailed Description

"lldb/Breakpoint/BreakpointResolverScripted.h" This class sets breakpoints on a given Address.

This breakpoint only takes once, and then it won't attempt to reset itself.

Definition at line 25 of file BreakpointResolverScripted.h.

Constructor & Destructor Documentation

◆ BreakpointResolverScripted() [1/2]

BreakpointResolverScripted::BreakpointResolverScripted ( const lldb::BreakpointSP & bkpt,
const llvm::StringRef class_name,
lldb::SearchDepth depth,
const StructuredDataImpl & args_data )

◆ ~BreakpointResolverScripted()

lldb_private::BreakpointResolverScripted::~BreakpointResolverScripted ( )
overridedefault

References error().

◆ BreakpointResolverScripted() [2/2]

lldb_private::BreakpointResolverScripted::BreakpointResolverScripted ( const BreakpointResolverScripted & )
privatedelete

Member Function Documentation

◆ classof() [1/2]

◆ classof() [2/2]

bool lldb_private::BreakpointResolverScripted::classof ( const BreakpointResolverScripted * )
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 51 of file BreakpointResolverScripted.h.

References BreakpointResolverScripted().

◆ CopyForBreakpoint()

lldb::BreakpointResolverSP BreakpointResolverScripted::CopyForBreakpoint ( lldb::BreakpointSP & breakpoint)
overridevirtual

Implements lldb_private::BreakpointResolver.

Definition at line 161 of file BreakpointResolverScripted.cpp.

References m_args, m_class_name, and m_depth.

◆ CreateFromStructuredData()

◆ CreateImplementationIfNeeded()

◆ Dump()

void BreakpointResolverScripted::Dump ( Stream * s) const
overridevirtual

Standard "Dump" method. At present it does nothing.

Implements lldb_private::BreakpointResolver.

Definition at line 158 of file BreakpointResolverScripted.cpp.

◆ GetDepth()

lldb::SearchDepth BreakpointResolverScripted::GetDepth ( )
overridevirtual

Implements lldb_private::Searcher.

Definition at line 137 of file BreakpointResolverScripted.cpp.

References lldb::eSearchDepthModule, and m_interface_sp.

◆ GetDescription()

void BreakpointResolverScripted::GetDescription ( Stream * s)
overridevirtual

Prints a canonical description for the breakpoint to the stream s.

Parameters
[in]sStream to which the output is copied.

Implements lldb_private::BreakpointResolver.

Definition at line 145 of file BreakpointResolverScripted.cpp.

References m_class_name, m_interface_sp, lldb_private::Stream::Printf(), and lldb_private::Stream::PutCString().

◆ GetScriptInterpreter()

ScriptInterpreter * BreakpointResolverScripted::GetScriptInterpreter ( )
private

◆ NotifyBreakpointSet()

void BreakpointResolverScripted::NotifyBreakpointSet ( )
overrideprotectedvirtual

◆ operator=()

const BreakpointResolverScripted & lldb_private::BreakpointResolverScripted::operator= ( const BreakpointResolverScripted & )
privatedelete

◆ SearchCallback()

Searcher::CallbackReturn BreakpointResolverScripted::SearchCallback ( SearchFilter & filter,
SymbolContext & context,
Address * addr )
overridevirtual

◆ SerializeToStructuredData()

Member Data Documentation

◆ m_args

StructuredDataImpl lldb_private::BreakpointResolverScripted::m_args
private

◆ m_class_name

std::string lldb_private::BreakpointResolverScripted::m_class_name
private

◆ m_depth

lldb::SearchDepth lldb_private::BreakpointResolverScripted::m_depth
private

Definition at line 66 of file BreakpointResolverScripted.h.

Referenced by BreakpointResolverScripted(), and CopyForBreakpoint().

◆ m_error

Status lldb_private::BreakpointResolverScripted::m_error
private

Definition at line 68 of file BreakpointResolverScripted.h.

Referenced by CreateImplementationIfNeeded().

◆ m_interface_sp

lldb::ScriptedBreakpointInterfaceSP lldb_private::BreakpointResolverScripted::m_interface_sp
private

The documentation for this class was generated from the following files: