LLDB mainline
Public Types | Public Member Functions | Protected Attributes | List of all members
lldb_private::SupportFileList Class Reference

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 FileSpecGetFileSpecAtIndex (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.
 

Detailed Description

A list of support files for a CompileUnit.

Definition at line 23 of file FileSpecList.h.

Member Typedef Documentation

◆ collection

typedef std::vector<std::shared_ptr<SupportFile> > lldb_private::SupportFileList::collection

Definition at line 29 of file FileSpecList.h.

◆ const_iterator

typedef collection::const_iterator lldb_private::SupportFileList::const_iterator

Definition at line 30 of file FileSpecList.h.

Constructor & Destructor Documentation

◆ SupportFileList() [1/3]

lldb_private::SupportFileList::SupportFileList ( )
inline

Definition at line 25 of file FileSpecList.h.

◆ SupportFileList() [2/3]

lldb_private::SupportFileList::SupportFileList ( const SupportFileList )
delete

◆ SupportFileList() [3/3]

lldb_private::SupportFileList::SupportFileList ( SupportFileList &&  other)
default

Member Function Documentation

◆ Append() [1/2]

void lldb_private::SupportFileList::Append ( const FileSpec file)
inline

◆ Append() [2/2]

void lldb_private::SupportFileList::Append ( std::shared_ptr< SupportFile > &&  file)
inline

Definition at line 37 of file FileSpecList.h.

References m_files.

◆ AppendIfUnique()

bool SupportFileList::AppendIfUnique ( const FileSpec file)

Definition at line 46 of file FileSpecList.cpp.

References Append(), end(), and m_files.

Referenced by SymbolFilePDB::ParseSupportFiles().

◆ begin()

const_iterator lldb_private::SupportFileList::begin ( ) const
inline

Definition at line 31 of file FileSpecList.h.

References m_files.

◆ EmplaceBack()

template<class... Args>
void lldb_private::SupportFileList::EmplaceBack ( Args &&...  args)
inline

Definition at line 78 of file FileSpecList.h.

References m_files.

◆ end()

const_iterator lldb_private::SupportFileList::end ( ) const
inline

Definition at line 32 of file FileSpecList.h.

References m_files.

Referenced by AppendIfUnique().

◆ FindCompatibleIndex()

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:

  • The file matches exactly (only filename if file has no directory)
  • If file is relative and any file in the list has this same suffix
  • If any file in the list is relative and the relative path is a suffix of file

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.

Parameters
[in]idxAn index into the file list.
[in]fileThe file specification to search for.
[in]realpath_prefixesPaths that start with one of the prefixes in this list will be realpath'ed to resolve any symlinks.
Returns
The index of the file that matches file if it is found, else UINT32_MAX is returned.

Definition at line 166 of file FileSpecList.cpp.

References lldb_private::GetLog(), lldb_private::RealpathPrefixes::IncreaseSourceRealpathCompatibleCount(), IsCompatible(), LLDB_LOGF, m_files, lldb_private::RealpathPrefixes::ResolveSymlinks(), lldb_private::Source, and UINT32_MAX.

Referenced by FindFileIndexes().

◆ FindFileIndex()

size_t SupportFileList::FindFileIndex ( size_t  idx,
const FileSpec file,
bool  full 
) const

◆ GetFileSpecAtIndex()

const FileSpec & SupportFileList::GetFileSpecAtIndex ( size_t  idx) const

◆ GetSize()

size_t lldb_private::SupportFileList::GetSize ( ) const
inline

◆ GetSupportFileAtIndex()

std::shared_ptr< SupportFile > SupportFileList::GetSupportFileAtIndex ( size_t  idx) const

Member Data Documentation

◆ m_files

collection lldb_private::SupportFileList::m_files
protected

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