LLDB mainline
|
#include <SearchFilter.h>
Public Member Functions | |
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. | |
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. | |
bool | ModulePasses (const FileSpec &spec) override |
Call this method with a file spec to see if that spec passes the filter. | |
bool | AddressPasses (Address &address) override |
Call this method with a Address to see if address 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. | |
void | Dump (Stream *s) const override |
Standard "Dump" method. At present it does nothing. | |
void | Search (Searcher &searcher) override |
Call this method to do the search using the Searcher. | |
StructuredData::ObjectSP | SerializeToStructuredData () override |
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. | |
SearchFilter (const lldb::TargetSP &target_sp, unsigned char filterType) | |
virtual | ~SearchFilter () |
virtual bool | ModulePasses (const FileSpec &spec) |
Call this method with a file spec to see if that spec passes the filter. | |
virtual bool | ModulePasses (const lldb::ModuleSP &module_sp) |
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. | |
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 unit. | |
virtual bool | CompUnitPasses (CompileUnit &compUnit) |
Call this method with a CompileUnit to see if comp unit passes the filter. | |
virtual bool | FunctionPasses (Function &function) |
Call this method with a Function to see if function passes the filter. | |
virtual void | Search (Searcher &searcher) |
Call this method to do the search using the Searcher. | |
virtual void | SearchInModuleList (Searcher &searcher, ModuleList &modules) |
Call this method to do the search using the Searcher in the module list modules. | |
virtual uint32_t | GetFilterRequiredItems () |
This determines which items are REQUIRED for the filter to pass. | |
virtual void | GetDescription (Stream *s) |
Prints a canonical description for the search filter to the stream s. | |
virtual void | Dump (Stream *s) const |
Standard "Dump" method. At present it does nothing. | |
lldb::SearchFilterSP | CreateCopy (lldb::TargetSP &target_sp) |
virtual StructuredData::ObjectSP | SerializeToStructuredData () |
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::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) |
virtual lldb::SearchFilterSP | DoCreateCopy ()=0 |
void | SetTarget (lldb::TargetSP &target_sp) |
Protected Attributes | |
FileSpecList | m_module_spec_list |
Protected Attributes inherited from lldb_private::SearchFilter | |
lldb::TargetSP | m_target_sp |
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) |
Static Protected Attributes inherited from lldb_private::SearchFilter | |
static const char * | g_option_names [LastOptionName] |
Definition at line 356 of file SearchFilter.h.
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.
[in] | targetSP | The Target that provides the module list to search. |
[in] | module_list | The Module that limits the search. |
Definition at line 497 of file SearchFilter.cpp.
SearchFilterByModuleList::SearchFilterByModuleList | ( | const lldb::TargetSP & | targetSP, |
const FileSpecList & | module_list, | ||
enum FilterTy | filter_ty | ||
) |
Definition at line 502 of file SearchFilter.cpp.
|
overridedefault |
|
overridevirtual |
Call this method with a Address to see if address passes the filter.
[in] | addr | The address to check against the filter. |
true
. Reimplemented from lldb_private::SearchFilter.
Reimplemented in lldb_private::SearchFilterByModuleListAndCU.
Definition at line 524 of file SearchFilter.cpp.
|
static |
Definition at line 585 of file SearchFilter.cpp.
References error(), lldb_private::StructuredData::Array::GetItemAtIndexAsString(), lldb_private::SearchFilter::GetKey(), lldb_private::StructuredData::Array::GetSize(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsArray(), and lldb_private::SearchFilter::ModList.
Referenced by lldb_private::SearchFilter::CreateFromStructuredData().
|
overrideprotectedvirtual |
Implements lldb_private::SearchFilter.
Reimplemented in lldb_private::SearchFilterByModuleListAndCU.
Definition at line 581 of file SearchFilter.cpp.
|
overridevirtual |
Standard "Dump" method. At present it does nothing.
Reimplemented from lldb_private::SearchFilter.
Reimplemented in lldb_private::SearchFilterByModuleListAndCU.
Definition at line 579 of file SearchFilter.cpp.
|
overridevirtual |
Prints a canonical description for the search filter to the stream s.
[in] | s | Stream to which the output is copied. |
Reimplemented from lldb_private::SearchFilter.
Reimplemented in lldb_private::SearchFilterByModuleListAndCU.
Definition at line 555 of file SearchFilter.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::FileSpec::GetFilename(), lldb_private::FileSpecList::GetFileSpecAtIndex(), lldb_private::FileSpecList::GetSize(), m_module_spec_list, lldb_private::Stream::Printf(), and lldb_private::Stream::PutCString().
|
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.
Reimplemented from lldb_private::SearchFilter.
Reimplemented in lldb_private::SearchFilterByModuleListAndCU.
Definition at line 575 of file SearchFilter.cpp.
|
overridevirtual |
Call this method with a file spec to see if that spec passes the filter.
[in] | spec | The file spec to check against the filter. |
true
. Reimplemented from lldb_private::SearchFilter.
Definition at line 517 of file SearchFilter.cpp.
References lldb_private::FileSpecList::FindFileIndex(), lldb_private::FileSpecList::GetSize(), m_module_spec_list, and UINT32_MAX.
|
overridevirtual |
Call this method with a Module to see if that module passes the filter.
[in] | module_sp | The Module to check against the filter. |
true
. Reimplemented from lldb_private::SearchFilter.
Definition at line 509 of file SearchFilter.cpp.
References lldb_private::FileSpecList::FindFileIndex(), lldb_private::FileSpecList::GetSize(), m_module_spec_list, and UINT32_MAX.
Referenced by lldb_private::SearchFilterByModuleListAndCU::AddressPasses(), and lldb_private::SearchFilterByModuleListAndCU::CompUnitPasses().
|
overridevirtual |
Call this method to do the search using the Searcher.
[in] | searcher | The searcher to drive with this search. |
Reimplemented from lldb_private::SearchFilter.
Reimplemented in lldb_private::SearchFilterByModuleListAndCU.
Definition at line 529 of file SearchFilter.cpp.
References lldb_private::SearchFilter::DoModuleIteration(), lldb_private::Searcher::eCallbackReturnStop, lldb::eSearchDepthTarget, lldb_private::FileSpecList::FindFileIndex(), lldb_private::Searcher::GetDepth(), m_module_spec_list, lldb_private::SearchFilter::m_target_sp, lldb_private::Searcher::SearchCallback(), lldb_private::SymbolContext::target_sp, and UINT32_MAX.
|
overridevirtual |
Reimplemented from lldb_private::SearchFilter.
Reimplemented in lldb_private::SearchFilterByModuleListAndCU.
Definition at line 617 of file SearchFilter.cpp.
References SerializeUnwrapped(), and lldb_private::SearchFilter::WrapOptionsDict().
void SearchFilterByModuleList::SerializeUnwrapped | ( | StructuredData::DictionarySP & | options_dict_sp | ) |
Definition at line 611 of file SearchFilter.cpp.
References m_module_spec_list, lldb_private::SearchFilter::ModList, and lldb_private::SearchFilter::SerializeFileSpecList().
Referenced by SerializeToStructuredData(), and lldb_private::SearchFilterByModuleListAndCU::SerializeToStructuredData().
|
protected |
Definition at line 401 of file SearchFilter.h.
Referenced by GetDescription(), lldb_private::SearchFilterByModuleListAndCU::GetDescription(), ModulePasses(), Search(), lldb_private::SearchFilterByModuleListAndCU::Search(), and SerializeUnwrapped().