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) 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 ( )

Definition at line 25 of file FileSpecList.h.

◆ SupportFileList() [2/3]

lldb_private::SupportFileList::SupportFileList ( const SupportFileList )

◆ SupportFileList() [3/3]

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

Member Function Documentation

◆ Append() [1/2]

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

◆ Append() [2/2]

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

Definition at line 37 of file FileSpecList.h.

References m_files.

◆ AppendIfUnique()

bool SupportFileList::AppendIfUnique ( const FileSpec file)

Definition at line 41 of file FileSpecList.cpp.

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

Referenced by SymbolFilePDB::ParseSupportFiles().

◆ begin()

const_iterator lldb_private::SupportFileList::begin ( ) const

Definition at line 31 of file FileSpecList.h.

References m_files.

◆ EmplaceBack()

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

Definition at line 72 of file FileSpecList.h.

References m_files.

◆ end()

const_iterator lldb_private::SupportFileList::end ( ) const

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 
) 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.

[in]idxAn index into the file list.
[in]fileThe file specification to search for.
The index of the file that matches file if it is found, else UINT32_MAX is returned.

Definition at line 111 of file FileSpecList.cpp.

References lldb_private::FileSpec::Equal(), lldb_private::FileSpec::FileEquals(), lldb_private::FileSpec::GetDirectory(), lldb_private::ConstString::GetStringRef(), lldb_private::FileSpec::IsCaseSensitive(), lldb_private::ConstString::IsEmpty(), lldb_private::FileSpec::IsRelative(), m_files, 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

◆ GetSupportFileAtIndex()

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

Member Data Documentation

◆ m_files

collection lldb_private::SupportFileList::m_files

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