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

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, std::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)


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

Detailed Description

Definition at line 34 of file SourceManager.h.

Member Typedef Documentation

◆ LineOffsets

Definition at line 84 of file SourceManager.h.

Constructor & Destructor Documentation

◆ File() [1/2]

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

Definition at line 404 of file SourceManager.cpp.

References CommonInitializer().

◆ File() [2/2]

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

Definition at line 396 of file SourceManager.cpp.

References CommonInitializer().

◆ ~File()

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

Member Function Documentation

◆ CalculateLineOffsets()

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

Definition at line 648 of file SourceManager.cpp.

References is_newline_char(), and UINT32_MAX.

◆ CommonInitializer()

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

◆ DisplaySourceLines()

size_t SourceManager::File::DisplaySourceLines ( uint32_t  line,
std::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 

Definition at line 620 of file SourceManager.cpp.

References lldb_private::RegularExpression::Execute(), and UINT32_MAX.

◆ GetFileSpec()

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

Definition at line 58 of file SourceManager.h.

References m_file_spec.

◆ GetLine()

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

Definition at line 701 of file SourceManager.cpp.

References UINT32_MAX.

◆ GetLineLength()

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

Definition at line 509 of file SourceManager.cpp.

References UINT32_MAX.

◆ GetLineOffset()

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

Definition at line 480 of file SourceManager.cpp.

References UINT32_MAX.

◆ GetNumLines()

uint32_t SourceManager::File::GetNumLines ( )

Definition at line 494 of file SourceManager.cpp.

◆ GetSourceMapModificationID()

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

Definition at line 60 of file SourceManager.h.

References m_source_map_mod_id.

◆ LineIsValid()

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

Definition at line 537 of file SourceManager.cpp.

◆ PeekLineData()

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

Definition at line 499 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 

Member Data Documentation

◆ m_data_sp

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

Definition at line 83 of file SourceManager.h.

◆ m_debugger_wp

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

Definition at line 86 of file SourceManager.h.

◆ m_file_spec

FileSpec lldb_private::SourceManager::File::m_file_spec

Definition at line 73 of file SourceManager.h.

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

◆ m_file_spec_orig

FileSpec lldb_private::SourceManager::File::m_file_spec_orig

Definition at line 71 of file SourceManager.h.

◆ m_mod_time

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

Definition at line 78 of file SourceManager.h.

Referenced by lldb_private::operator==().

◆ m_offsets

LineOffsets lldb_private::SourceManager::File::m_offsets

Definition at line 85 of file SourceManager.h.

◆ m_source_map_mod_id

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

Definition at line 82 of file SourceManager.h.

Referenced by GetSourceMapModificationID().

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