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

#include <SearchFilter.h>

Inheritance diagram for lldb_private::SearchFilterByModuleListAndCU:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::SearchFilterByModuleListAndCU:
Collaboration graph
[legend]

Public Member Functions

 SearchFilterByModuleListAndCU (const lldb::TargetSP &targetSP, const FileSpecList &module_list, const FileSpecList &cu_list)
 The basic constructor takes a Target, which gives the space to search, and the module list to restrict the search to. More...
 
 ~SearchFilterByModuleListAndCU () override
 
bool AddressPasses (Address &address) override
 Call this method with a Address to see if address passes the filter. More...
 
bool CompUnitPasses (FileSpec &fileSpec) override
 Call this method with a FileSpec to see if file spec passes the filter as the name of a compilation unit. More...
 
bool CompUnitPasses (CompileUnit &compUnit) override
 Call this method with a CompileUnit to see if comp unit passes the filter. More...
 
void GetDescription (Stream *s) override
 Prints a canonical description for the search filter to the stream s. More...
 
uint32_t GetFilterRequiredItems () override
 This determines which items are REQUIRED for the filter to pass. More...
 
void Dump (Stream *s) const override
 Standard "Dump" method. At present it does nothing. More...
 
void Search (Searcher &searcher) override
 Call this method to do the search using the Searcher. More...
 
StructuredData::ObjectSP SerializeToStructuredData () override
 
- Public Member Functions inherited from lldb_private::SearchFilterByModuleList
 SearchFilterByModuleList (const lldb::TargetSP &targetSP, const FileSpecList &module_list)
 The basic constructor takes a Target, which gives the space to search, and the module list to restrict the search to. More...
 
 SearchFilterByModuleList (const lldb::TargetSP &targetSP, const FileSpecList &module_list, enum FilterTy filter_ty)
 
 ~SearchFilterByModuleList () override
 
bool ModulePasses (const lldb::ModuleSP &module_sp) override
 Call this method with a Module to see if that module passes the filter. More...
 
bool ModulePasses (const FileSpec &spec) override
 Call this method with a file spec to see if that spec passes the filter. More...
 
void SerializeUnwrapped (StructuredData::DictionarySP &options_dict_sp)
 
- Public Member Functions inherited from lldb_private::SearchFilter
 SearchFilter (const lldb::TargetSP &target_sp)
 The basic constructor takes a Target, which gives the space to search. More...
 
 SearchFilter (const lldb::TargetSP &target_sp, unsigned char filterType)
 
virtual ~SearchFilter ()
 
virtual bool FunctionPasses (Function &function)
 Call this method with a Function to see if function passes the filter. More...
 
virtual void SearchInModuleList (Searcher &searcher, ModuleList &modules)
 Call this method to do the search using the Searcher in the module list modules. More...
 
lldb::SearchFilterSP CreateCopy (lldb::TargetSP &target_sp)
 
enum FilterTy GetFilterTy ()
 
const char * GetFilterName ()
 

Static Public Member Functions

static lldb::SearchFilterSP CreateFromStructuredData (const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
 
- Static Public Member Functions inherited from lldb_private::SearchFilterByModuleList
static lldb::SearchFilterSP CreateFromStructuredData (const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
 
- Static Public Member Functions inherited from lldb_private::SearchFilter
static lldb::SearchFilterSP CreateFromStructuredData (const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
 
static const char * GetSerializationKey ()
 
static const char * GetSerializationSubclassKey ()
 
static const char * GetSerializationSubclassOptionsKey ()
 
static const char * FilterTyToName (enum FilterTy)
 
static FilterTy NameToFilterTy (llvm::StringRef name)
 

Protected Member Functions

lldb::SearchFilterSP DoCreateCopy () override
 
- Protected Member Functions inherited from lldb_private::SearchFilter
StructuredData::DictionarySP WrapOptionsDict (StructuredData::DictionarySP options_dict_sp)
 
void SerializeFileSpecList (StructuredData::DictionarySP &options_dict_sp, OptionNames name, FileSpecList &file_list)
 
Searcher::CallbackReturn DoModuleIteration (const SymbolContext &context, Searcher &searcher)
 
Searcher::CallbackReturn DoModuleIteration (const lldb::ModuleSP &module_sp, Searcher &searcher)
 
Searcher::CallbackReturn DoCUIteration (const lldb::ModuleSP &module_sp, const SymbolContext &context, Searcher &searcher)
 
Searcher::CallbackReturn DoFunctionIteration (Function *function, const SymbolContext &context, Searcher &searcher)
 
void SetTarget (lldb::TargetSP &target_sp)
 

Private Attributes

FileSpecList m_cu_spec_list
 

Additional Inherited Members

- Public Types inherited from lldb_private::SearchFilter
enum  FilterTy {
  Unconstrained = 0, Exception, ByModule, ByModules,
  ByModulesAndCU, LastKnownFilterType = ByModulesAndCU, UnknownFilter
}
 
- Static Public Attributes inherited from lldb_private::SearchFilter
static const char * g_ty_to_name [LastKnownFilterType+2]
 
- Protected Types inherited from lldb_private::SearchFilter
enum  OptionNames { ModList = 0, CUList, LanguageName, LastOptionName }
 
- Static Protected Member Functions inherited from lldb_private::SearchFilter
static const char * GetKey (enum OptionNames enum_value)
 
- Protected Attributes inherited from lldb_private::SearchFilterByModuleList
FileSpecList m_module_spec_list
 
- Protected Attributes inherited from lldb_private::SearchFilter
lldb::TargetSP m_target_sp
 
- Static Protected Attributes inherited from lldb_private::SearchFilter
static const char * g_option_names [LastOptionName]
 

Detailed Description

Definition at line 404 of file SearchFilter.h.

Constructor & Destructor Documentation

◆ SearchFilterByModuleListAndCU()

SearchFilterByModuleListAndCU::SearchFilterByModuleListAndCU ( const lldb::TargetSP &  targetSP,
const FileSpecList &  module_list,
const FileSpecList &  cu_list 
)

The basic constructor takes a Target, which gives the space to search, and the module list to restrict the search to.

Definition at line 626 of file SearchFilter.cpp.

◆ ~SearchFilterByModuleListAndCU()

SearchFilterByModuleListAndCU::~SearchFilterByModuleListAndCU ( )
overridedefault

Member Function Documentation

◆ AddressPasses()

bool SearchFilterByModuleListAndCU::AddressPasses ( Address addr)
overridevirtual

Call this method with a Address to see if address passes the filter.

Parameters
[in]addrThe address to check against the filter.
Returns
true if address passes, and false otherwise.
Note
the default implementation always returns true.

Reimplemented from lldb_private::SearchFilterByModuleList.

Definition at line 691 of file SearchFilter.cpp.

References lldb_private::Address::CalculateSymbolContext(), lldb_private::SymbolContext::comp_unit, lldb_private::CompileUnit::GetPrimaryFile(), m_cu_spec_list, lldb_private::SymbolContext::module_sp, lldb_private::SearchFilterByModuleList::ModulePasses(), and UINT32_MAX.

◆ CompUnitPasses() [1/2]

bool SearchFilterByModuleListAndCU::CompUnitPasses ( CompileUnit compUnit)
overridevirtual

Call this method with a CompileUnit to see if comp unit passes the filter.

Parameters
[in]compUnitThe CompileUnit to check against the filter.
Returns
true if Comp Unit passes, and false otherwise.
Note
the default implementation always returns true.

Reimplemented from lldb_private::SearchFilter.

Definition at line 710 of file SearchFilter.cpp.

References lldb_private::ModuleChild::GetModule(), lldb_private::CompileUnit::GetPrimaryFile(), m_cu_spec_list, lldb_private::SearchFilterByModuleList::ModulePasses(), and UINT32_MAX.

◆ CompUnitPasses() [2/2]

bool SearchFilterByModuleListAndCU::CompUnitPasses ( FileSpec fileSpec)
overridevirtual

Call this method with a FileSpec to see if file spec passes the filter as the name of a compilation unit.

Parameters
[in]fileSpecThe file spec to check against the filter.
Returns
true if file spec passes, and false otherwise.
Note
the default implementation always returns true.

Reimplemented from lldb_private::SearchFilter.

Definition at line 706 of file SearchFilter.cpp.

References m_cu_spec_list, and UINT32_MAX.

◆ CreateFromStructuredData()

lldb::SearchFilterSP SearchFilterByModuleListAndCU::CreateFromStructuredData ( const lldb::TargetSP &  target_sp,
const StructuredData::Dictionary data_dict,
Status error 
)
static

◆ DoCreateCopy()

SearchFilterSP SearchFilterByModuleListAndCU::DoCreateCopy ( )
overrideprotectedvirtual

Reimplemented from lldb_private::SearchFilterByModuleList.

Definition at line 798 of file SearchFilter.cpp.

◆ Dump()

void SearchFilterByModuleListAndCU::Dump ( Stream s) const
overridevirtual

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

Reimplemented from lldb_private::SearchFilterByModuleList.

Definition at line 796 of file SearchFilter.cpp.

◆ GetDescription()

void SearchFilterByModuleListAndCU::GetDescription ( Stream s)
overridevirtual

Prints a canonical description for the search filter to the stream s.

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

Reimplemented from lldb_private::SearchFilterByModuleList.

Definition at line 773 of file SearchFilter.cpp.

References lldb_private::SearchFilterByModuleList::m_module_spec_list, lldb_private::Stream::Printf(), and lldb_private::Stream::PutCString().

◆ GetFilterRequiredItems()

uint32_t SearchFilterByModuleListAndCU::GetFilterRequiredItems ( )
overridevirtual

This determines which items are REQUIRED for the filter to pass.

For instance, if you are filtering by Compilation Unit, obviously symbols that have no compilation unit can't pass So return eSymbolContextCU and search callbacks can then short cut the search to avoid looking at things that obviously won't pass.

Returns
The required elements for the search, which is an or'ed together set of lldb:SearchContextItem enum's.

Reimplemented from lldb_private::SearchFilterByModuleList.

Definition at line 792 of file SearchFilter.cpp.

◆ Search()

void SearchFilterByModuleListAndCU::Search ( Searcher searcher)
overridevirtual

◆ SerializeToStructuredData()

StructuredData::ObjectSP SearchFilterByModuleListAndCU::SerializeToStructuredData ( )
overridevirtual

Member Data Documentation

◆ m_cu_spec_list

FileSpecList lldb_private::SearchFilterByModuleListAndCU::m_cu_spec_list
private

Definition at line 439 of file SearchFilter.h.

Referenced by AddressPasses(), CompUnitPasses(), Search(), and SerializeToStructuredData().


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