llvm/lldb/source/Core/SourceManager.cpp

//===-- SourceManager.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "lldb/Core/SourceManager.h"

#include "lldb/Core/Address.h"
#include "lldb/Core/AddressRange.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/FormatEntity.h"
#include "lldb/Core/Highlighter.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/LineEntry.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Target/PathMappingList.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/AnsiTerminal.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/DataBuffer.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/RegularExpression.h"
#include "lldb/Utility/Stream.h"
#include "lldb/lldb-enumerations.h"

#include "llvm/ADT/Twine.h"

#include <memory>
#include <optional>
#include <utility>

#include <cassert>
#include <cstdio>

namespace lldb_private {
class ExecutionContext;
}
namespace lldb_private {
class ValueObject;
}

usingnamespacelldb;
usingnamespacelldb_private;

static inline bool is_newline_char(char ch) {}

static void resolve_tilde(FileSpec &file_spec) {}

static std::string toString(const Checksum &checksum) {}

// SourceManager constructor
SourceManager::SourceManager(const TargetSP &target_sp)
    :{}

SourceManager::SourceManager(const DebuggerSP &debugger_sp)
    :{}

// Destructor
SourceManager::~SourceManager() = default;

SourceManager::FileSP SourceManager::GetFile(SupportFileSP support_file_sp) {}

static bool should_highlight_source(DebuggerSP debugger_sp) {}

static bool should_show_stop_column_with_ansi(DebuggerSP debugger_sp) {}

static bool should_show_stop_column_with_caret(DebuggerSP debugger_sp) {}

static bool should_show_stop_line_with_ansi(DebuggerSP debugger_sp) {}

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) {}

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) {}

size_t SourceManager::DisplayMoreWithLineNumbers(
    Stream *s, uint32_t count, bool reverse, const SymbolContextList *bp_locs) {}

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

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

void SourceManager::FindLinesMatchingRegex(SupportFileSP support_file_sp,
                                           RegularExpression &regex,
                                           uint32_t start_line,
                                           uint32_t end_line,
                                           std::vector<uint32_t> &match_lines) {}

SourceManager::File::File(SupportFileSP support_file_sp,
                          lldb::DebuggerSP debugger_sp)
    :{}

SourceManager::File::File(SupportFileSP support_file_sp, TargetSP target_sp)
    :{}

void SourceManager::File::CommonInitializer(SupportFileSP support_file_sp,
                                            TargetSP target_sp) {}

void SourceManager::File::SetSupportFile(lldb::SupportFileSP support_file_sp) {}

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

uint32_t SourceManager::File::GetNumLines() {}

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

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

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

bool SourceManager::File::ModificationTimeIsStale() const {}

bool SourceManager::File::PathRemappingIsStale() const {}

size_t SourceManager::File::DisplaySourceLines(uint32_t line,
                                               std::optional<size_t> column,
                                               uint32_t context_before,
                                               uint32_t context_after,
                                               Stream *s) {}

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

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

bool SourceManager::File::CalculateLineOffsets(uint32_t line) {}

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

void SourceManager::SourceFileCache::AddSourceFile(const FileSpec &file_spec,
                                                   FileSP file_sp) {}

void SourceManager::SourceFileCache::RemoveSourceFile(const FileSP &file_sp) {}

void SourceManager::SourceFileCache::AddSourceFileImpl(
    const FileSpec &file_spec, FileSP file_sp) {}

SourceManager::FileSP SourceManager::SourceFileCache::FindSourceFile(
    const FileSpec &file_spec) const {}

void SourceManager::SourceFileCache::Dump(Stream &stream) const {}