LLDB mainline
Classes | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
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 ()
 
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.

◆ SourceManager() [2/3]

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

Definition at line 71 of file SourceManager.cpp.

◆ ~SourceManager()

SourceManager::~SourceManager ( )
default

◆ SourceManager() [3/3]

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

Member Function Documentation

◆ DefaultFileAndLineSet()

bool lldb_private::SourceManager::DefaultFileAndLineSet ( )
inline

Definition at line 186 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()

size_t SourceManager::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 
)

◆ 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 453 of file SourceManager.cpp.

References GetFile().

◆ GetDefaultFileAndLine()

std::optional< SourceManager::SupportFileAndLine > SourceManager::GetDefaultFileAndLine ( )

◆ GetFile()

SourceManager::FileSP SourceManager::GetFile ( lldb::SupportFileSP  support_file_sp)

◆ GetLastFile()

FileSP lldb_private::SourceManager::GetLastFile ( )
inline

◆ operator=()

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

◆ SetDefaultFileAndLine()

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

Member Data Documentation

◆ m_debugger_wp

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

◆ m_default_set

bool lldb_private::SourceManager::m_default_set
protected

◆ m_last_count

uint32_t lldb_private::SourceManager::m_last_count
protected

◆ m_last_line

uint32_t lldb_private::SourceManager::m_last_line
protected

◆ 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

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