llvm/lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp

//===-- PdbUtil.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 "PdbUtil.h"

#include "DWARFLocationExpression.h"
#include "PdbIndex.h"
#include "PdbSymUid.h"

#include "llvm/DebugInfo/CodeView/CVTypeVisitor.h"
#include "llvm/DebugInfo/CodeView/SymbolDeserializer.h"
#include "llvm/DebugInfo/CodeView/TypeDeserializer.h"
#include "llvm/DebugInfo/PDB/Native/DbiStream.h"
#include "llvm/DebugInfo/PDB/Native/TpiStream.h"

#include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
#include "Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.h"
#include "lldb/Symbol/Block.h"
#include "lldb/Utility/LLDBAssert.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/lldb-enumerations.h"

usingnamespacelldb_private;
usingnamespacelldb_private::npdb;
usingnamespacellvm::codeview;
usingnamespacellvm::pdb;

// The returned range list is guaranteed to be sorted and no overlaps between
// adjacent ranges because fields in LocalVariableAddrGap are unsigned integers.
static Variable::RangeList
MakeRangeList(const PdbIndex &index, const LocalVariableAddrRange &range,
              llvm::ArrayRef<LocalVariableAddrGap> gaps) {}

namespace {
struct MemberLocations {};

// A range map with address ranges to a map of pair of offset and locaitons.
RangeMap;

void AddMemberLocationRanges(RangeMap &location_map, uint64_t offset,
                             MemberValLocation member_loc,
                             const Variable::RangeList &ranges) {}

void AddDwarfRange(RangeMap &location_map, const DWARFExpression &expr,
                   const Variable::RangeList &ranges) {}
} // namespace

CVTagRecord CVTagRecord::create(CVType type) {}

CVTagRecord::CVTagRecord(ClassRecord &&c)
    :{}
CVTagRecord::CVTagRecord(UnionRecord &&u)
    :{}
CVTagRecord::CVTagRecord(EnumRecord &&e) :{}

PDB_SymType lldb_private::npdb::CVSymToPDBSym(SymbolKind kind) {}

PDB_SymType lldb_private::npdb::CVTypeToPDBType(TypeLeafKind kind) {}

bool lldb_private::npdb::SymbolHasAddress(const CVSymbol &sym) {}

bool lldb_private::npdb::SymbolIsCode(const CVSymbol &sym) {}

template <typename RecordT> RecordT createRecord(const CVSymbol &sym) {}

template <typename RecordT>
static SegmentOffset GetSegmentAndOffset(const CVSymbol &sym) {}

template <>
SegmentOffset GetSegmentAndOffset<TrampolineSym>(const CVSymbol &sym) {}

template <> SegmentOffset GetSegmentAndOffset<Thunk32Sym>(const CVSymbol &sym) {}

template <>
SegmentOffset GetSegmentAndOffset<CoffGroupSym>(const CVSymbol &sym) {}

template <> SegmentOffset GetSegmentAndOffset<DataSym>(const CVSymbol &sym) {}

template <>
SegmentOffset GetSegmentAndOffset<ThreadLocalDataSym>(const CVSymbol &sym) {}

SegmentOffset lldb_private::npdb::GetSegmentAndOffset(const CVSymbol &sym) {}

template <typename RecordT>
SegmentOffsetLength GetSegmentOffsetAndLength(const CVSymbol &sym) {}

template <>
SegmentOffsetLength
GetSegmentOffsetAndLength<TrampolineSym>(const CVSymbol &sym) {}

template <>
SegmentOffsetLength GetSegmentOffsetAndLength<Thunk32Sym>(const CVSymbol &sym) {}

template <>
SegmentOffsetLength
GetSegmentOffsetAndLength<CoffGroupSym>(const CVSymbol &sym) {}

SegmentOffsetLength
lldb_private::npdb::GetSegmentOffsetAndLength(const CVSymbol &sym) {}

bool lldb_private::npdb::IsForwardRefUdt(CVType cvt) {}

bool lldb_private::npdb::IsTagRecord(llvm::codeview::CVType cvt) {}

bool lldb_private::npdb::IsClassStructUnion(llvm::codeview::CVType cvt) {}

bool lldb_private::npdb::IsForwardRefUdt(const PdbTypeSymId &id,
                                         TpiStream &tpi) {}

bool lldb_private::npdb::IsTagRecord(const PdbTypeSymId &id, TpiStream &tpi) {}

lldb::AccessType
lldb_private::npdb::TranslateMemberAccess(MemberAccess access) {}

TypeIndex lldb_private::npdb::GetFieldListIndex(CVType cvt) {}

TypeIndex lldb_private::npdb::LookThroughModifierRecord(CVType modifier) {}

llvm::StringRef lldb_private::npdb::DropNameScope(llvm::StringRef name) {}

VariableInfo lldb_private::npdb::GetVariableNameInfo(CVSymbol sym) {}

static llvm::FixedStreamArray<FrameData>::Iterator
GetCorrespondingFrameData(lldb::addr_t load_addr,
                          const DebugFrameDataSubsectionRef &fpo_data,
                          const Variable::RangeList &ranges) {}

static bool GetFrameDataProgram(PdbIndex &index,
                                const Variable::RangeList &ranges,
                                llvm::StringRef &out_program) {}

static RegisterId GetBaseFrameRegister(PdbIndex &index,
                                       PdbCompilandSymId frame_proc_id,
                                       bool is_parameter) {}

VariableInfo lldb_private::npdb::GetVariableLocationInfo(
    PdbIndex &index, PdbCompilandSymId var_id, Block &func_block,
    lldb::ModuleSP module) {}

lldb::BasicType
lldb_private::npdb::GetCompilerTypeForSimpleKind(SimpleTypeKind kind) {}

size_t lldb_private::npdb::GetTypeSizeForSimpleKind(SimpleTypeKind kind) {}

PdbTypeSymId lldb_private::npdb::GetBestPossibleDecl(PdbTypeSymId id,
                                                     TpiStream &tpi) {}

template <typename RecordType> static size_t GetSizeOfTypeInternal(CVType cvt) {}

size_t lldb_private::npdb::GetSizeOfType(PdbTypeSymId id,
                                         llvm::pdb::TpiStream &tpi) {}