LLDB mainline
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
lldb_private::BreakpointResolverFileRegex Class Reference

"lldb/Breakpoint/BreakpointResolverFileRegex.h" This class sets breakpoints by file and line. More...

#include <BreakpointResolverFileRegex.h>

Inheritance diagram for lldb_private::BreakpointResolverFileRegex:
Inheritance graph
[legend]

Public Member Functions

 BreakpointResolverFileRegex (const lldb::BreakpointSP &bkpt, RegularExpression regex, const std::unordered_set< std::string > &func_name_set, bool exact_match)
 
StructuredData::ObjectSP SerializeToStructuredData () override
 
 ~BreakpointResolverFileRegex () override=default
 
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.
 
void AddFunctionName (const char *func_name)
 
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)
 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
 
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.
 
void GetDescription (Stream *s) override=0
 Prints a canonical description for the breakpoint to the stream s.
 
virtual void Dump (Stream *s) const =0
 Standard "Dump" method. At present it does nothing.
 
virtual StructuredData::ObjectSP SerializeToStructuredData ()
 
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 ()
 
virtual lldb::BreakpointResolverSP CopyForBreakpoint (lldb::BreakpointSP &breakpoint)=0
 
- Public Member Functions inherited from lldb_private::Searcher
 Searcher ()
 
virtual ~Searcher ()
 
virtual CallbackReturn SearchCallback (SearchFilter &filter, SymbolContext &context, Address *addr)=0
 
virtual lldb::SearchDepth GetDepth ()=0
 
virtual void GetDescription (Stream *s)
 Prints a canonical description for the searcher to the stream s.
 

Static Public Member Functions

static lldb::BreakpointResolverSP CreateFromStructuredData (const StructuredData::Dictionary &options_dict, Status &error)
 
static bool classof (const BreakpointResolverFileRegex *)
 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 Attributes

RegularExpression m_regex
 
bool m_exact_match
 
std::unordered_set< std::string > m_function_names
 

Private Member Functions

 BreakpointResolverFileRegex (const BreakpointResolverFileRegex &)=delete
 
const BreakpointResolverFileRegexoperator= (const BreakpointResolverFileRegex &)=delete
 

Friends

class Breakpoint
 

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
}
 
- Protected Member Functions inherited from lldb_private::BreakpointResolver
virtual void NotifyBreakpointSet ()
 
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)
 
- Static Protected Attributes inherited from lldb_private::BreakpointResolver
static const char * g_option_names [static_cast< uint32_t >(OptionNames::LastOptionName)]
 

Detailed Description

"lldb/Breakpoint/BreakpointResolverFileRegex.h" This class sets breakpoints by file and line.

Optionally, it will look for inlined instances of the file and line specification.

Definition at line 24 of file BreakpointResolverFileRegex.h.

Constructor & Destructor Documentation

◆ BreakpointResolverFileRegex() [1/2]

BreakpointResolverFileRegex::BreakpointResolverFileRegex ( const lldb::BreakpointSP bkpt,
RegularExpression  regex,
const std::unordered_set< std::string > &  func_name_set,
bool  exact_match 
)

Definition at line 22 of file BreakpointResolverFileRegex.cpp.

◆ ~BreakpointResolverFileRegex()

lldb_private::BreakpointResolverFileRegex::~BreakpointResolverFileRegex ( )
overridedefault

◆ BreakpointResolverFileRegex() [2/2]

lldb_private::BreakpointResolverFileRegex::BreakpointResolverFileRegex ( const BreakpointResolverFileRegex )
privatedelete

Member Function Documentation

◆ AddFunctionName()

void BreakpointResolverFileRegex::AddFunctionName ( const char *  func_name)

Definition at line 166 of file BreakpointResolverFileRegex.cpp.

References m_function_names.

◆ classof() [1/2]

static bool lldb_private::BreakpointResolverFileRegex::classof ( const BreakpointResolver V)
inlinestatic

◆ classof() [2/2]

static bool lldb_private::BreakpointResolverFileRegex::classof ( const BreakpointResolverFileRegex )
inlinestatic

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

Definition at line 51 of file BreakpointResolverFileRegex.h.

◆ CopyForBreakpoint()

lldb::BreakpointResolverSP BreakpointResolverFileRegex::CopyForBreakpoint ( lldb::BreakpointSP breakpoint)
overridevirtual

◆ CreateFromStructuredData()

BreakpointResolverSP BreakpointResolverFileRegex::CreateFromStructuredData ( const StructuredData::Dictionary options_dict,
Status error 
)
static

◆ Dump()

void BreakpointResolverFileRegex::Dump ( Stream s) const
overridevirtual

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

Implements lldb_private::BreakpointResolver.

Definition at line 157 of file BreakpointResolverFileRegex.cpp.

◆ GetDepth()

lldb::SearchDepth BreakpointResolverFileRegex::GetDepth ( )
overridevirtual

Implements lldb_private::Searcher.

Definition at line 148 of file BreakpointResolverFileRegex.cpp.

References lldb::eSearchDepthCompUnit.

◆ GetDescription()

void BreakpointResolverFileRegex::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 152 of file BreakpointResolverFileRegex.cpp.

References lldb_private::RegularExpression::GetText(), m_exact_match, m_regex, and lldb_private::Stream::Printf().

◆ operator=()

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

◆ SearchCallback()

Searcher::CallbackReturn BreakpointResolverFileRegex::SearchCallback ( SearchFilter filter,
SymbolContext context,
Address addr 
)
overridevirtual

◆ SerializeToStructuredData()

StructuredData::ObjectSP BreakpointResolverFileRegex::SerializeToStructuredData ( )
overridevirtual

Friends And Related Function Documentation

◆ Breakpoint

friend class Breakpoint
friend

Definition at line 62 of file BreakpointResolverFileRegex.h.

Member Data Documentation

◆ m_exact_match

bool lldb_private::BreakpointResolverFileRegex::m_exact_match
protected

◆ m_function_names

std::unordered_set<std::string> lldb_private::BreakpointResolverFileRegex::m_function_names
protected

◆ m_regex

RegularExpression lldb_private::BreakpointResolverFileRegex::m_regex
protected

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