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

Public Types

typedef std::shared_ptr< FileFileSP
 

Public Member Functions

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

FileSpec m_last_file_spec
 
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 33 of file SourceManager.h.

Member Typedef Documentation

◆ FileSP

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

Definition at line 99 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 70 of file SourceManager.cpp.

◆ SourceManager() [2/3]

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

Definition at line 65 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 164 of file SourceManager.h.

References GetFile(), and m_last_file_spec.

◆ DisplayMoreWithLineNumbers()

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

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

References GetFile().

◆ GetDefaultFileAndLine()

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

◆ GetFile()

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

◆ GetLastFile()

FileSP lldb_private::SourceManager::GetLastFile ( )
inline

◆ operator=()

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

◆ 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

◆ 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_file_spec

FileSpec lldb_private::SourceManager::m_last_file_spec
protected

◆ m_last_line

uint32_t lldb_private::SourceManager::m_last_line
protected

◆ m_target_wp

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

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