#include "DWARFLocationExpression.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/Section.h"
#include "lldb/Expression/DWARFExpression.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/StreamBuffer.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/CodeView/TypeDeserializer.h"
#include "llvm/DebugInfo/CodeView/TypeIndex.h"
#include "llvm/DebugInfo/PDB/Native/TpiStream.h"
#include "llvm/Support/Endian.h"
#include "PdbUtil.h"
#include "CodeViewRegisterMapping.h"
#include "PdbFPOProgramToDWARFExpression.h"
#include <optional>
usingnamespacelldb;
usingnamespacelldb_private;
usingnamespacelldb_private::npdb;
usingnamespacellvm::codeview;
usingnamespacellvm::pdb;
uint32_t GetGenericRegisterNumber(llvm::codeview::RegisterId register_id) { … }
static uint32_t GetRegisterNumber(llvm::Triple::ArchType arch_type,
llvm::codeview::RegisterId register_id,
RegisterKind ®ister_kind) { … }
static bool IsSimpleTypeSignedInteger(SimpleTypeKind kind) { … }
static std::pair<size_t, bool> GetIntegralTypeInfo(TypeIndex ti,
TpiStream &tpi) { … }
template <typename StreamWriter>
static DWARFExpression MakeLocationExpressionInternal(lldb::ModuleSP module,
StreamWriter &&writer) { … }
static bool MakeRegisterBasedLocationExpressionInternal(
Stream &stream, llvm::codeview::RegisterId reg, RegisterKind ®ister_kind,
std::optional<int32_t> relative_offset, lldb::ModuleSP module) { … }
static DWARFExpression MakeRegisterBasedLocationExpressionInternal(
llvm::codeview::RegisterId reg, std::optional<int32_t> relative_offset,
lldb::ModuleSP module) { … }
DWARFExpression lldb_private::npdb::MakeEnregisteredLocationExpression(
llvm::codeview::RegisterId reg, lldb::ModuleSP module) { … }
DWARFExpression lldb_private::npdb::MakeRegRelLocationExpression(
llvm::codeview::RegisterId reg, int32_t offset, lldb::ModuleSP module) { … }
static bool EmitVFrameEvaluationDWARFExpression(
llvm::StringRef program, llvm::Triple::ArchType arch_type, Stream &stream) { … }
DWARFExpression lldb_private::npdb::MakeVFrameRelLocationExpression(
llvm::StringRef fpo_program, int32_t offset, lldb::ModuleSP module) { … }
DWARFExpression lldb_private::npdb::MakeGlobalLocationExpression(
uint16_t section, uint32_t offset, ModuleSP module) { … }
DWARFExpression lldb_private::npdb::MakeConstantLocationExpression(
TypeIndex underlying_ti, TpiStream &tpi, const llvm::APSInt &constant,
ModuleSP module) { … }
DWARFExpression
lldb_private::npdb::MakeEnregisteredLocationExpressionForComposite(
const std::map<uint64_t, MemberValLocation> &offset_to_location,
std::map<uint64_t, size_t> &offset_to_size, size_t total_size,
lldb::ModuleSP module) { … }