LLDB mainline
|
A file collection class. More...
#include "lldb/Utility/FileSpecList.h"
Public Types | |
typedef std::vector< FileSpec > | collection |
typedef collection::const_iterator | const_iterator |
Public Member Functions | |
FileSpecList () | |
Default constructor. | |
FileSpecList (const FileSpecList &rhs)=default | |
Copy constructor. | |
FileSpecList (FileSpecList &&rhs)=default | |
Move constructor. | |
FileSpecList (std::vector< FileSpec > &&rhs) | |
Initialize this object from a vector of FileSpecs. | |
~FileSpecList () | |
Destructor. | |
FileSpecList & | operator= (const FileSpecList &rhs)=default |
Assignment operator. | |
FileSpecList & | operator= (FileSpecList &&rhs)=default |
Move-assignment operator. | |
void | Append (const FileSpec &file) |
Append a FileSpec object to the list. | |
bool | AppendIfUnique (const FileSpec &file) |
Append a FileSpec object if unique. | |
template<class... Args> | |
void | EmplaceBack (Args &&...args) |
Inserts a new FileSpec into the FileSpecList constructed in-place with the given arguments. | |
void | Clear () |
Clears the file list. | |
void | Dump (Stream *s, const char *separator_cstr="\n") const |
Dumps the file list to the supplied stream pointer "s". | |
size_t | FindFileIndex (size_t idx, const FileSpec &file, bool full) const |
Find a file index. | |
const FileSpec & | GetFileSpecAtIndex (size_t idx) const |
Get file at index. | |
size_t | MemorySize () const |
Get the memory cost of this object. | |
bool | IsEmpty () const |
size_t | GetSize () const |
Get the number of files in the file list. | |
bool | Insert (size_t idx, const FileSpec &file) |
bool | Replace (size_t idx, const FileSpec &file) |
bool | Remove (size_t idx) |
const_iterator | begin () const |
const_iterator | end () const |
llvm::iterator_range< const_iterator > | files () const |
Protected Attributes | |
collection | m_files |
A collection of FileSpec objects. | |
A file collection class.
A class that contains a mutable list of FileSpec objects.
Definition at line 85 of file FileSpecList.h.
typedef std::vector<FileSpec> lldb_private::FileSpecList::collection |
Definition at line 87 of file FileSpecList.h.
typedef collection::const_iterator lldb_private::FileSpecList::const_iterator |
Definition at line 88 of file FileSpecList.h.
FileSpecList::FileSpecList | ( | ) |
Default constructor.
Initialize this object with an empty file list.
Definition at line 18 of file FileSpecList.cpp.
Referenced by MemorySize().
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Initialize this object from a vector of FileSpecs.
Definition at line 102 of file FileSpecList.h.
|
default |
Destructor.
void FileSpecList::Append | ( | const FileSpec & | file | ) |
Append a FileSpec object to the list.
Appends file to the end of the file list.
[in] | file | A new file to append to this file list. |
Definition at line 23 of file FileSpecList.cpp.
References m_files.
Referenced by lldb_private::StructuredDataDarwinLog::AddInitCompletionHook(), lldb_private::OptionValueFileSpecList::AppendCurrentValue(), lldb::SBTarget::BreakpointCreateByName(), lldb_private::Target::CreateBreakpoint(), lldb_private::Target::CreateBreakpointAtUserEntry(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), CommandObjectBreakpointSet::DoExecute(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwpSymbolFile(), lldb_private::PlatformDarwin::LocateExecutableScriptingResources(), ObjectFileMachO::ParseSymtab(), DynamicLoaderMacOS::SetNotificationBreakpoint(), DynamicLoaderDarwinKernel::SetNotificationBreakpointIfNeeded(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), and lldb_private::OptionValueFileSpecList::SetValueFromString().
bool FileSpecList::AppendIfUnique | ( | const FileSpec & | file | ) |
Append a FileSpec object if unique.
Appends file to the end of the file list if it doesn't already exist in the file list.
[in] | file | A new file to append to this file list. |
Definition at line 31 of file FileSpecList.cpp.
References end(), and m_files.
Referenced by ObjectFileELF::GetDependentModules(), ObjectFileMachO::GetDependentModules(), ObjectFilePECOFF::GetDependentModules(), GetModuleConfig(), lldb_private::SymbolLocatorDefault::LocateExecutableSymbolFile(), ObjectFileMachO::ParseSymtab(), CommandObjectBreakpointSet::CommandOptions::SetOptionValue(), and CommandObjectThreadJump::CommandOptions::SetOptionValue().
|
inline |
void FileSpecList::Clear | ( | ) |
Clears the file list.
Definition at line 54 of file FileSpecList.cpp.
References m_files.
Referenced by lldb_private::OptionValueFileSpecList::Clear(), lldb_private::ObjectFileJIT::GetDependentModules(), CommandObjectBreakpointSet::CommandOptions::OptionParsingStarting(), CommandObjectThreadJump::CommandOptions::OptionParsingStarting(), and lldb_private::OptionValueFileSpecList::SetValueFromString().
void FileSpecList::Dump | ( | Stream * | s, |
const char * | separator_cstr = "\n" |
||
) | const |
Dumps the file list to the supplied stream pointer "s".
[in] | s | The stream that will be used to dump the object description. |
Definition at line 57 of file FileSpecList.cpp.
References lldb_private::Stream::AsRawOstream(), end(), m_files, and lldb_private::Stream::PutCString().
|
inline |
Inserts a new FileSpec into the FileSpecList constructed in-place with the given arguments.
[in] | args | Arguments to create the FileSpec |
Definition at line 146 of file FileSpecList.h.
References m_files.
Referenced by lldb_private::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), lldb_private::SearchFilterByModuleListAndCU::CreateFromStructuredData(), and lldb_private::PlatformDarwin::SetThreadCreationBreakpoint().
|
inline |
Definition at line 239 of file FileSpecList.h.
References m_files.
Referenced by AppendIfUnique(), Dump(), files(), and MemorySize().
|
inline |
Definition at line 241 of file FileSpecList.h.
References begin(), and end().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwpSymbolFile().
size_t FileSpecList::FindFileIndex | ( | size_t | idx, |
const FileSpec & | file, | ||
bool | full | ||
) | const |
Find a file index.
Find the index of the file in the file spec list that matches file starting idx entries into the file spec list.
[in] | idx | An index into the file list. |
[in] | file | The file specification to search for. |
[in] | full | Should FileSpec::Equal be called with "full" true or false. |
Definition at line 95 of file FileSpecList.cpp.
References m_files.
Referenced by lldb_private::SearchFilterByModuleListAndCU::AddressPasses(), lldb_private::SearchFilterByModuleListAndCU::CompUnitPasses(), lldb_private::SearchFilterByModuleList::ModulePasses(), lldb_private::SearchFilterByModuleList::Search(), and lldb_private::SearchFilterByModuleListAndCU::Search().
const FileSpec & FileSpecList::GetFileSpecAtIndex | ( | size_t | idx | ) | const |
Get file at index.
Gets a file from the file list. If idx is not a valid index, an empty FileSpec object will be returned. The file objects that are returned can be tested using FileSpec::operator void*().
[in] | idx | An index into the file list. |
Definition at line 165 of file FileSpecList.cpp.
References m_files.
Referenced by lldb_private::ClangModulesDeclVendor::Create(), CommandObjectTargetVariable::DoExecute(), CommandObjectThreadJump::DoExecute(), CommandObjectBreakpointSet::DoExecute(), lldb_private::OptionValueFileSpecList::DumpValue(), lldb_private::PlatformDarwin::FindBundleBinaryInExecSearchPaths(), lldb_private::ThreadPlanStepInRange::FrameMatchesAvoidCriteria(), lldb_private::SearchFilterByModuleList::GetDescription(), lldb_private::SearchFilterByModuleListAndCU::GetDescription(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), lldb_private::ModuleList::GetSharedModule(), lldb_private::PlatformDarwin::GetSharedModule(), lldb_private::Module::LoadScriptingResourceInTarget(), lldb_private::SymbolLocatorDefault::LocateExecutableSymbolFile(), ObjectFileMachO::ParseSymtab(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), lldb_private::SearchFilter::SerializeFileSpecList(), and lldb_private::Target::SetExecutableModule().
size_t FileSpecList::GetSize | ( | ) | const |
Get the number of files in the file list.
Definition at line 201 of file FileSpecList.cpp.
References m_files.
Referenced by lldb_private::SearchFilterByModuleListAndCU::AddressPasses(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::Target::CreateScriptedBreakpoint(), lldb_private::TargetList::CreateTargetInternal(), CommandObjectTargetVariable::DoExecute(), CommandObjectThreadJump::DoExecute(), CommandObjectBreakpointSet::DoExecute(), lldb_private::OptionValueFileSpecList::DumpValue(), lldb_private::PlatformDarwin::FindBundleBinaryInExecSearchPaths(), lldb_private::ThreadPlanStepInRange::FrameMatchesAvoidCriteria(), ObjectFilePECOFF::GetDependentModules(), lldb_private::SearchFilterByModuleList::GetDescription(), lldb_private::SearchFilterByModuleListAndCU::GetDescription(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), GetModuleConfig(), lldb_private::Target::GetSearchFilterForModuleAndCUList(), lldb_private::Target::GetSearchFilterForModuleList(), lldb_private::ModuleList::GetSharedModule(), lldb_private::PlatformDarwin::GetSharedModule(), lldb_private::Module::LoadScriptingResourceInTarget(), lldb_private::SymbolLocatorDefault::LocateExecutableSymbolFile(), lldb_private::SearchFilterByModuleList::ModulePasses(), ObjectFileMachO::ParseSymtab(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), lldb_private::SearchFilterByModuleListAndCU::Search(), lldb_private::SearchFilter::SerializeFileSpecList(), lldb_private::Target::SetExecutableModule(), CommandObjectThreadJump::CommandOptions::SetOptionValue(), and lldb_private::OptionValueFileSpecList::SetValueFromString().
|
inline |
Definition at line 211 of file FileSpecList.h.
References m_files.
Referenced by lldb_private::OptionValueFileSpecList::SetValueFromString().
|
inline |
Definition at line 203 of file FileSpecList.h.
References m_files.
size_t FileSpecList::MemorySize | ( | ) | const |
Get the memory cost of this object.
Return the size in bytes that this object takes in memory. This returns the size in bytes of this object, not any shared string values it may refer to.
Definition at line 190 of file FileSpecList.cpp.
References end(), FileSpecList(), and m_files.
|
default |
Assignment operator.
Replace the file list in this object with the file list from rhs.
[in] | rhs | A file list object to copy. |
|
default |
Move-assignment operator.
|
inline |
Definition at line 230 of file FileSpecList.h.
References m_files.
Referenced by lldb_private::OptionValueFileSpecList::SetValueFromString().
|
inline |
Definition at line 222 of file FileSpecList.h.
References m_files.
Referenced by lldb_private::OptionValueFileSpecList::SetValueFromString().
|
protected |
A collection of FileSpec objects.
Definition at line 246 of file FileSpecList.h.
Referenced by Append(), AppendIfUnique(), begin(), Clear(), Dump(), EmplaceBack(), end(), FindFileIndex(), GetFileSpecAtIndex(), GetSize(), Insert(), IsEmpty(), MemorySize(), Remove(), and Replace().