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

#include <SourceManager.h>

Collaboration diagram for lldb_private::SourceManager:
Collaboration graph
[legend]

Classes

class  File
 
class  SourceFileCache
 

Public Types

typedef std::shared_ptr< FileFileSP
 

Public Member Functions

 SourceManager (const lldb::DebuggerSP &debugger_sp)
 
 SourceManager (const lldb::TargetSP &target_sp)
 
 ~SourceManager ()
 
FileSP GetLastFile ()
 
size_t DisplaySourceLinesWithLineNumbers (const FileSpec &file, 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 (const FileSpec &file_spec, uint32_t line)
 
bool GetDefaultFileAndLine (FileSpec &file_spec, uint32_t &line)
 
bool DefaultFileAndLineSet ()
 
void FindLinesMatchingRegex (FileSpec &file_spec, RegularExpression &regex, uint32_t start_line, uint32_t end_line, std::vector< uint32_t > &match_lines)
 
FileSP GetFile (const FileSpec &file_spec)
 

Protected Attributes

FileSP m_last_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
 

Detailed Description

Definition at line 40 of file SourceManager.h.

Member Typedef Documentation

◆ FileSP

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

Definition at line 102 of file SourceManager.h.

Constructor & Destructor Documentation

◆ SourceManager() [1/2]

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

Referenced by is_newline_char().

◆ SourceManager() [2/2]

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

◆ ~SourceManager()

SourceManager::~SourceManager ( )

Definition at line 63 of file SourceManager.cpp.

Member Function Documentation

◆ DefaultFileAndLineSet()

bool lldb_private::SourceManager::DefaultFileAndLineSet ( )
inline

◆ DisplayMoreWithLineNumbers()

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

Definition at line 249 of file SourceManager.cpp.

References UINT32_MAX.

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

◆ DisplaySourceLinesWithLineNumbers()

size_t SourceManager::DisplaySourceLinesWithLineNumbers ( const FileSpec file,
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 ( FileSpec file_spec,
RegularExpression regex,
uint32_t  start_line,
uint32_t  end_line,
std::vector< uint32_t > &  match_lines 
)

Definition at line 352 of file SourceManager.cpp.

◆ GetDefaultFileAndLine()

bool SourceManager::GetDefaultFileAndLine ( FileSpec file_spec,
uint32_t line 
)

◆ GetFile()

SourceManager::FileSP SourceManager::GetFile ( const FileSpec file_spec)

Definition at line 65 of file SourceManager.cpp.

References lldb_private::FileSystem::Instance().

Referenced by DefaultFileAndLineSet().

◆ GetLastFile()

FileSP lldb_private::SourceManager::GetLastFile ( )
inline

◆ SetDefaultFileAndLine()

bool SourceManager::SetDefaultFileAndLine ( const FileSpec file_spec,
uint32_t  line 
)

Member Data Documentation

◆ m_debugger_wp

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

Definition at line 166 of file SourceManager.h.

◆ m_default_set

bool lldb_private::SourceManager::m_default_set
protected

Definition at line 164 of file SourceManager.h.

◆ m_last_count

uint32_t lldb_private::SourceManager::m_last_count
protected

Definition at line 163 of file SourceManager.h.

◆ m_last_file_sp

FileSP lldb_private::SourceManager::m_last_file_sp
protected

Definition at line 161 of file SourceManager.h.

Referenced by DefaultFileAndLineSet(), and GetLastFile().

◆ m_last_line

uint32_t lldb_private::SourceManager::m_last_line
protected

Definition at line 162 of file SourceManager.h.

◆ m_target_wp

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

Definition at line 165 of file SourceManager.h.


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