Go to the documentation of this file.
9 #ifndef LLDB_CORE_SEARCHFILTER_H
10 #define LLDB_CORE_SEARCHFILTER_H
91 SearchFilter(
const lldb::TargetSP &target_sp,
unsigned char filterType);
114 virtual bool ModulePasses(
const lldb::ModuleSP &module_sp);
200 lldb::SearchFilterSP
CreateCopy(lldb::TargetSP& target_sp);
202 static lldb::SearchFilterSP
230 if (
SubclassID > FilterTy::LastKnownFilterType)
231 return FilterTy::UnknownFilter;
298 bool ModulePasses(
const lldb::ModuleSP &module_sp)
override;
300 static lldb::SearchFilterSP
328 bool ModulePasses(
const lldb::ModuleSP &module_sp)
override;
342 static lldb::SearchFilterSP
367 const FileSpecList &module_list);
370 const FileSpecList &module_list,
375 bool ModulePasses(
const lldb::ModuleSP &module_sp)
override;
389 static lldb::SearchFilterSP
409 const FileSpecList &module_list,
410 const FileSpecList &cu_list);
428 static lldb::SearchFilterSP
444 #endif // LLDB_CORE_SEARCHFILTER_H
lldb::SearchFilterSP DoCreateCopy() override
lldb::TargetSP m_target_sp
lldb::SearchFilterSP DoCreateCopy() override
void GetDescription(Stream *s) override
Prints a canonical description for the search filter to the stream s.
static lldb::SearchFilterSP CreateFromStructuredData(const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
static lldb::SearchFilterSP CreateFromStructuredData(const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
uint32_t GetFilterRequiredItems() override
This determines which items are REQUIRED for the filter to pass.
enum FilterTy GetFilterTy()
FileSpecList m_cu_spec_list
StructuredData::ObjectSP SerializeToStructuredData() override
void Search(Searcher &searcher) override
Call this method to do the search using the Searcher.
bool ModulePasses(const lldb::ModuleSP &module_sp) override
Call this method with a Module to see if that module passes the filter.
virtual bool AddressPasses(Address &addr)
Call this method with a Address to see if address passes the filter.
static const char * g_ty_to_name[LastKnownFilterType+2]
virtual bool ModulePasses(const FileSpec &spec)
Call this method with a file spec to see if that spec passes the filter.
static FilterTy NameToFilterTy(llvm::StringRef name)
Searcher::CallbackReturn DoModuleIteration(const SymbolContext &context, Searcher &searcher)
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 restric...
virtual void Dump(Stream *s) const
Standard "Dump" method. At present it does nothing.
virtual uint32_t GetFilterRequiredItems()
This determines which items are REQUIRED for the filter to pass.
~SearchFilterForUnconstrainedSearches() override=default
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 u...
Searcher::CallbackReturn DoCUIteration(const lldb::ModuleSP &module_sp, const SymbolContext &context, Searcher &searcher)
virtual void SearchInModuleList(Searcher &searcher, ModuleList &modules)
Call this method to do the search using the Searcher in the module list modules.
StructuredData::ObjectSP SerializeToStructuredData() override
StructuredData::DictionarySP WrapOptionsDict(StructuredData::DictionarySP options_dict_sp)
virtual void Search(Searcher &searcher)
Call this method to do the search using the Searcher.
void SerializeFileSpecList(StructuredData::DictionarySP &options_dict_sp, OptionNames name, FileSpecList &file_list)
virtual void GetDescription(Stream *s)
Prints a canonical description for the search filter to the stream s.
virtual lldb::SearchFilterSP DoCreateCopy()=0
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
lldb::SearchFilterSP DoCreateCopy() override
~SearchFilterByModule() override
static llvm::raw_ostream & error(Stream &strm)
bool AddressPasses(Address &address) override
Call this method with a Address to see if address passes the filter.
General Outline: Provides the callback and search depth for the SearchFilter search.
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 restric...
static lldb::SearchFilterSP CreateFromStructuredData(const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
void Search(Searcher &searcher) override
Call this method to do the search using the Searcher.
static const char * g_option_names[LastOptionName]
std::shared_ptr< Object > ObjectSP
bool ModulePasses(const FileSpec &module_spec) override
Call this method with a file spec to see if that spec passes the filter.
std::shared_ptr< Dictionary > DictionarySP
void SerializeUnwrapped(StructuredData::DictionarySP &options_dict_sp)
static const char * GetSerializationKey()
void SetTarget(lldb::TargetSP &target_sp)
StructuredData::ObjectSP SerializeToStructuredData() override
lldb::SearchFilterSP DoCreateCopy() override
virtual void GetDescription(Stream *s)
Prints a canonical description for the searcher to the stream s.
uint32_t GetFilterRequiredItems() override
This determines which items are REQUIRED for the filter to pass.
FileSpecList m_module_spec_list
SearchFilterForUnconstrainedSearches(const lldb::TargetSP &target_sp)
virtual CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr)=0
static lldb::SearchFilterSP CreateFromStructuredData(const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
void GetDescription(Stream *s) override
Prints a canonical description for the search filter to the stream s.
lldb::SearchFilterSP CreateCopy(lldb::TargetSP &target_sp)
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
virtual bool CompUnitPasses(FileSpec &fileSpec)
Call this method with a FileSpec to see if file spec passes the filter as the name of a compilation u...
const char * GetFilterName()
SearchFilterByModule(const lldb::TargetSP &targetSP, const FileSpec &module)
The basic constructor takes a Target, which gives the space to search, and the module to restrict the...
static const char * GetKey(enum OptionNames enum_value)
A class that represents a running process on the host machine.
static const char * FilterTyToName(enum FilterTy)
StructuredData::ObjectSP SerializeToStructuredData() override
static const char * GetSerializationSubclassKey()
General Outline: Provides the callback and search depth for the SearchFilter search.
bool AddressPasses(Address &address) override
Call this method with a Address to see if address passes the filter.
virtual lldb::SearchDepth GetDepth()=0
bool AddressPasses(Address &address) override
Call this method with a Address to see if address passes the filter.
SearchFilter(const lldb::TargetSP &target_sp)
The basic constructor takes a Target, which gives the space to search.
~SearchFilterByModuleListAndCU() override
void Search(Searcher &searcher) override
Call this method to do the search using the Searcher.
virtual bool FunctionPasses(Function &function)
Call this method with a Function to see if function passes the filter.
void GetDescription(Stream *s) override
Prints a canonical description for the search filter to the stream s.
uint32_t GetFilterRequiredItems() override
This determines which items are REQUIRED for the filter to pass.
static lldb::SearchFilterSP CreateFromStructuredData(const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
Searcher::CallbackReturn DoFunctionIteration(Function *function, const SymbolContext &context, Searcher &searcher)
~SearchFilterByModuleList() override
virtual StructuredData::ObjectSP SerializeToStructuredData()
bool ModulePasses(const lldb::ModuleSP &module_sp) override
Call this method with a Module to see if that module passes the filter.
@ eCallbackReturnContinue
static const char * GetSerializationSubclassOptionsKey()