|
LLDB mainline
|
A list of support files for a CompileUnit. More...
#include <FileSpecList.h>
Public Types | |
| typedef std::vector< std::shared_ptr< SupportFile > > | collection |
| typedef collection::const_iterator | const_iterator |
Public Member Functions | |
| SupportFileList () | |
| SupportFileList (const SupportFileList &)=delete | |
| SupportFileList (SupportFileList &&other)=default | |
| const_iterator | begin () const |
| const_iterator | end () const |
| void | Append (const FileSpec &file) |
| void | Append (std::shared_ptr< SupportFile > &&file) |
| bool | AppendIfUnique (const FileSpec &file) |
| size_t | GetSize () const |
| const FileSpec & | GetFileSpecAtIndex (size_t idx) const |
| lldb::SupportFileSP | GetSupportFileAtIndex (size_t idx) const |
| size_t | FindFileIndex (size_t idx, const FileSpec &file, bool full) const |
| size_t | FindCompatibleIndex (size_t idx, const FileSpec &file, RealpathPrefixes *realpath_prefixes=nullptr) const |
| Find a compatible file index. | |
| template<class... Args> | |
| void | EmplaceBack (Args &&...args) |
Protected Attributes | |
| collection | m_files |
| A collection of FileSpec objects. | |
A list of support files for a CompileUnit.
Definition at line 23 of file FileSpecList.h.
| typedef std::vector<std::shared_ptr<SupportFile> > lldb_private::SupportFileList::collection |
Definition at line 29 of file FileSpecList.h.
| typedef collection::const_iterator lldb_private::SupportFileList::const_iterator |
Definition at line 30 of file FileSpecList.h.
|
inline |
Definition at line 25 of file FileSpecList.h.
Referenced by SupportFileList(), and SupportFileList().
|
delete |
References SupportFileList().
|
default |
References SupportFileList().
|
inline |
Definition at line 34 of file FileSpecList.h.
References Append().
Referenced by Append(), AppendIfUnique(), lldb_private::breakpad::SymbolFileBreakpad::ParseSupportFiles(), and lldb_private::npdb::SymbolFileNativePDB::ParseSupportFiles().
|
inline |
Definition at line 37 of file FileSpecList.h.
References m_files.
Definition at line 46 of file FileSpecList.cpp.
References Append(), end(), and m_files.
Referenced by SymbolFilePDB::ParseSupportFiles().
|
inline |
Definition at line 31 of file FileSpecList.h.
References m_files.
|
inline |
Definition at line 78 of file FileSpecList.h.
References m_files.
|
inline |
| size_t SupportFileList::FindCompatibleIndex | ( | size_t | idx, |
| const FileSpec & | file, | ||
| RealpathPrefixes * | realpath_prefixes = nullptr ) const |
Find a compatible file index.
Find the index of a compatible file in the file spec list that matches file starting idx entries into the file spec list. A file is considered compatible if:
This is used to implement better matching for setting breakpoints in source files where an IDE might specify a full path when setting the breakpoint and debug info contains relative paths, if a user specifies a relative path when setting a breakpoint.
| [in] | idx | An index into the file list. |
| [in] | file | The file specification to search for. |
| [in] | realpath_prefixes | Paths that start with one of the prefixes in this list will be realpath'ed to resolve any symlinks. |
Definition at line 166 of file FileSpecList.cpp.
References lldb_private::GetLog(), lldb_private::RealpathPrefixes::IncreaseSourceRealpathCompatibleCount(), IsCompatible(), kBothDirectoryAndFileMatch, kOnlyFileMatch, LLDB_LOGF, m_files, lldb_private::RealpathPrefixes::ResolveSymlinks(), lldb_private::Source, and UINT32_MAX.
Referenced by FindFileIndexes().
Definition at line 107 of file FileSpecList.cpp.
References m_files.
Referenced by CommandObjectSourceInfo::DumpFileLinesInCompUnit(), lldb::SBCompileUnit::FindSupportFileIndex(), and lldb_private::FileLineResolver::SearchCallback().
| const FileSpec & SupportFileList::GetFileSpecAtIndex | ( | size_t | idx | ) | const |
Definition at line 210 of file FileSpecList.cpp.
References m_files.
Referenced by CommandObjectSourceInfo::DumpFileLinesInCompUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetFile(), lldb_private::DebugMacroEntry::GetFileSpec(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), and lldb_private::npdb::SymbolFileNativePDB::ParseInlineSite().
|
inline |
Definition at line 42 of file FileSpecList.h.
References m_files.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::ParseCompileUnit().
| std::shared_ptr< SupportFile > SupportFileList::GetSupportFileAtIndex | ( | size_t | idx | ) | const |
Definition at line 218 of file FileSpecList.cpp.
References m_files.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::ParseCompileUnit().
|
protected |
A collection of FileSpec objects.
Definition at line 84 of file FileSpecList.h.
Referenced by Append(), AppendIfUnique(), begin(), EmplaceBack(), end(), FindCompatibleIndex(), FindFileIndex(), GetFileSpecAtIndex(), GetSize(), and GetSupportFileAtIndex().