LLDB mainline
lldb_private::SourceManager Class Reference

#include <SourceManager.h>

Classes

class  File
class  SourceFileCache
 The SourceFileCache class separates the source manager from the cache of source files. More...
struct  SupportFileAndLine

Public Types

typedef std::shared_ptr< FileFileSP

Public Member Functions

 ~SourceManager ()
FileSP GetLastFile ()
bool AtLastLine (bool reverse)
size_t DisplaySourceLinesWithLineNumbers (lldb::SupportFileSP support_file_sp, uint32_t line, uint32_t column, uint32_t context_before, uint32_t context_after, const char *current_line_cstr, Stream *s, const SymbolContextList *bp_locs=nullptr)
size_t DisplaySourceLinesWithLineNumbersUsingLastFile (uint32_t start_line, uint32_t count, uint32_t curr_line, uint32_t column, const char *current_line_cstr, Stream *s, const SymbolContextList *bp_locs=nullptr)
size_t DisplayMoreWithLineNumbers (Stream *s, uint32_t count, bool reverse, const SymbolContextList *bp_locs=nullptr)
bool SetDefaultFileAndLine (lldb::SupportFileSP support_file_sp, uint32_t line)
std::optional< SupportFileAndLineGetDefaultFileAndLine ()
bool DefaultFileAndLineSet ()
void FindLinesMatchingRegex (lldb::SupportFileSP support_file_sp, RegularExpression &regex, uint32_t start_line, uint32_t end_line, std::vector< uint32_t > &match_lines)
FileSP GetFile (lldb::SupportFileSP support_file_sp)
 SourceManager (const lldb::DebuggerSP &debugger_sp)
 A source manager can be made with a valid Target, in which case it can use the path remappings to find source files that are not in their build locations.
 SourceManager (const lldb::TargetSP &target_sp)

Protected Attributes

lldb::SupportFileSP m_last_support_file_sp
uint32_t m_last_line
uint32_t m_last_count
bool m_default_set
lldb::TargetWP m_target_wp
lldb::DebuggerWP m_debugger_wp

Private Member Functions

 SourceManager (const SourceManager &)=delete
const SourceManageroperator= (const SourceManager &)=delete

Detailed Description

Definition at line 34 of file SourceManager.h.

Member Typedef Documentation

◆ FileSP

typedef std::shared_ptr<File> lldb_private::SourceManager::FileSP

Definition at line 114 of file SourceManager.h.

Constructor & Destructor Documentation

◆ SourceManager() [1/3]

SourceManager::SourceManager ( const lldb::DebuggerSP & debugger_sp)

A source manager can be made with a valid Target, in which case it can use the path remappings to find source files that are not in their build locations.

Without a target it won't be able to do this.

Definition at line 76 of file SourceManager.cpp.

References m_debugger_wp, m_default_set, m_last_count, m_last_line, m_last_support_file_sp, and m_target_wp.

Referenced by operator=(), and SourceManager().

◆ SourceManager() [2/3]

SourceManager::SourceManager ( const lldb::TargetSP & target_sp)

◆ ~SourceManager()

SourceManager::~SourceManager ( )
default

◆ SourceManager() [3/3]

lldb_private::SourceManager::SourceManager ( const SourceManager & )
privatedelete

References SourceManager().

Member Function Documentation

◆ AtLastLine()

bool lldb_private::SourceManager::AtLastLine ( bool reverse)
inline

Definition at line 158 of file SourceManager.h.

References m_last_line, and UINT32_MAX.

Referenced by DisplayMoreWithLineNumbers(), and CommandObjectSourceList::DoExecute().

◆ DefaultFileAndLineSet()

bool lldb_private::SourceManager::DefaultFileAndLineSet ( )
inline

Definition at line 189 of file SourceManager.h.

References GetFile(), and m_last_support_file_sp.

◆ DisplayMoreWithLineNumbers()

size_t SourceManager::DisplayMoreWithLineNumbers ( Stream * s,
uint32_t count,
bool reverse,
const SymbolContextList * bp_locs = nullptr )

◆ DisplaySourceLinesWithLineNumbers()

size_t SourceManager::DisplaySourceLinesWithLineNumbers ( lldb::SupportFileSP support_file_sp,
uint32_t line,
uint32_t column,
uint32_t context_before,
uint32_t context_after,
const char * current_line_cstr,
Stream * s,
const SymbolContextList * bp_locs = nullptr )

◆ DisplaySourceLinesWithLineNumbersUsingLastFile()

◆ FindLinesMatchingRegex()

void SourceManager::FindLinesMatchingRegex ( lldb::SupportFileSP support_file_sp,
RegularExpression & regex,
uint32_t start_line,
uint32_t end_line,
std::vector< uint32_t > & match_lines )

Definition at line 449 of file SourceManager.cpp.

References GetFile().

◆ GetDefaultFileAndLine()

◆ GetFile()

◆ GetLastFile()

◆ operator=()

const SourceManager & lldb_private::SourceManager::operator= ( const SourceManager & )
privatedelete

References SourceManager().

◆ SetDefaultFileAndLine()

bool SourceManager::SetDefaultFileAndLine ( lldb::SupportFileSP support_file_sp,
uint32_t line )

Definition at line 392 of file SourceManager.cpp.

References GetFile(), m_default_set, m_last_line, and m_last_support_file_sp.

Referenced by GetDefaultFileAndLine().

Member Data Documentation

◆ m_debugger_wp

lldb::DebuggerWP lldb_private::SourceManager::m_debugger_wp
protected

◆ m_default_set

◆ m_last_count

uint32_t lldb_private::SourceManager::m_last_count
protected

◆ m_last_line

◆ m_last_support_file_sp

lldb::SupportFileSP lldb_private::SourceManager::m_last_support_file_sp
protected

◆ m_target_wp

lldb::TargetWP lldb_private::SourceManager::m_target_wp
protected

Definition at line 205 of file SourceManager.h.

Referenced by GetDefaultFileAndLine(), GetFile(), SourceManager(), and SourceManager().


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