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

#include <SourceManager.h>

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

Public Member Functions

 File (const FileSpec &file_spec, Target *target)
 
 File (const FileSpec &file_spec, lldb::DebuggerSP debugger_sp)
 
 ~File ()=default
 
void UpdateIfNeeded ()
 
size_t DisplaySourceLines (uint32_t line, llvm::Optional< size_t > column, uint32_t context_before, uint32_t context_after, Stream *s)
 
void FindLinesMatchingRegex (RegularExpression &regex, uint32_t start_line, uint32_t end_line, std::vector< uint32_t > &match_lines)
 
bool GetLine (uint32_t line_no, std::string &buffer)
 
uint32_t GetLineOffset (uint32_t line)
 
bool LineIsValid (uint32_t line)
 
const FileSpecGetFileSpec ()
 
uint32_t GetSourceMapModificationID () const
 
const char * PeekLineData (uint32_t line)
 
uint32_t GetLineLength (uint32_t line, bool include_newline_chars)
 
uint32_t GetNumLines ()
 

Protected Types

typedef std::vector< uint32_tLineOffsets
 

Protected Member Functions

bool CalculateLineOffsets (uint32_t line=UINT32_MAX)
 

Protected Attributes

FileSpec m_file_spec_orig
 
FileSpec m_file_spec
 
llvm::sys::TimePoint m_mod_time
 
uint32_t m_source_map_mod_id = 0
 
lldb::DataBufferSP m_data_sp
 
LineOffsets m_offsets
 
lldb::DebuggerWP m_debugger_wp
 

Private Member Functions

void CommonInitializer (const FileSpec &file_spec, Target *target)
 

Friends

bool operator== (const SourceManager::File &lhs, const SourceManager::File &rhs)
 

Detailed Description

Definition at line 33 of file SourceManager.h.

Member Typedef Documentation

◆ LineOffsets

Definition at line 83 of file SourceManager.h.

Constructor & Destructor Documentation

◆ File() [1/2]

SourceManager::File::File ( const FileSpec file_spec,
Target target 
)

Definition at line 393 of file SourceManager.cpp.

References CommonInitializer().

◆ File() [2/2]

SourceManager::File::File ( const FileSpec file_spec,
lldb::DebuggerSP  debugger_sp 
)

Definition at line 385 of file SourceManager.cpp.

References CommonInitializer().

◆ ~File()

lldb_private::SourceManager::File::~File ( )
default

Member Function Documentation

◆ CalculateLineOffsets()

bool SourceManager::File::CalculateLineOffsets ( uint32_t  line = UINT32_MAX)
protected

Definition at line 636 of file SourceManager.cpp.

References is_newline_char(), and UINT32_MAX.

◆ CommonInitializer()

void SourceManager::File::CommonInitializer ( const FileSpec file_spec,
Target target 
)
private

◆ DisplaySourceLines()

size_t SourceManager::File::DisplaySourceLines ( uint32_t  line,
llvm::Optional< size_t >  column,
uint32_t  context_before,
uint32_t  context_after,
Stream s 
)

◆ FindLinesMatchingRegex()

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

◆ GetFileSpec()

const FileSpec& lldb_private::SourceManager::File::GetFileSpec ( )
inline

Definition at line 57 of file SourceManager.h.

References m_file_spec.

◆ GetLine()

bool SourceManager::File::GetLine ( uint32_t  line_no,
std::string buffer 
)

Definition at line 689 of file SourceManager.cpp.

References UINT32_MAX.

◆ GetLineLength()

uint32_t SourceManager::File::GetLineLength ( uint32_t  line,
bool  include_newline_chars 
)

Definition at line 497 of file SourceManager.cpp.

References UINT32_MAX.

◆ GetLineOffset()

uint32_t SourceManager::File::GetLineOffset ( uint32_t  line)

Definition at line 468 of file SourceManager.cpp.

References UINT32_MAX.

◆ GetNumLines()

uint32_t SourceManager::File::GetNumLines ( )

Definition at line 482 of file SourceManager.cpp.

◆ GetSourceMapModificationID()

uint32_t lldb_private::SourceManager::File::GetSourceMapModificationID ( ) const
inline

Definition at line 59 of file SourceManager.h.

References m_source_map_mod_id.

◆ LineIsValid()

bool SourceManager::File::LineIsValid ( uint32_t  line)

Definition at line 525 of file SourceManager.cpp.

◆ PeekLineData()

const char * SourceManager::File::PeekLineData ( uint32_t  line)

Definition at line 487 of file SourceManager.cpp.

◆ UpdateIfNeeded()

void SourceManager::File::UpdateIfNeeded ( )

Friends And Related Function Documentation

◆ operator==

bool operator== ( const SourceManager::File lhs,
const SourceManager::File rhs 
)
friend

Member Data Documentation

◆ m_data_sp

lldb::DataBufferSP lldb_private::SourceManager::File::m_data_sp
protected

Definition at line 82 of file SourceManager.h.

◆ m_debugger_wp

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

Definition at line 85 of file SourceManager.h.

◆ m_file_spec

FileSpec lldb_private::SourceManager::File::m_file_spec
protected

Definition at line 72 of file SourceManager.h.

Referenced by GetFileSpec(), and lldb_private::operator==().

◆ m_file_spec_orig

FileSpec lldb_private::SourceManager::File::m_file_spec_orig
protected

Definition at line 70 of file SourceManager.h.

◆ m_mod_time

llvm::sys::TimePoint lldb_private::SourceManager::File::m_mod_time
protected

Definition at line 77 of file SourceManager.h.

Referenced by lldb_private::operator==().

◆ m_offsets

LineOffsets lldb_private::SourceManager::File::m_offsets
protected

Definition at line 84 of file SourceManager.h.

◆ m_source_map_mod_id

uint32_t lldb_private::SourceManager::File::m_source_map_mod_id = 0
protected

Definition at line 81 of file SourceManager.h.

Referenced by GetSourceMapModificationID().


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