1 //===-- DWARFLocationExpression.h -------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_NATIVEPDB_DWARFLOCATIONEXPRESSION_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_NATIVEPDB_DWARFLOCATIONEXPRESSION_H
12 #include "lldb/lldb-forward.h"
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/DebugInfo/CodeView/CodeView.h"
27 namespace lldb_private
{
29 struct MemberValLocation
{
32 bool is_at_reg
= true;
36 MakeEnregisteredLocationExpression(llvm::codeview::RegisterId reg
,
37 lldb::ModuleSP module
);
39 DWARFExpression
MakeRegRelLocationExpression(llvm::codeview::RegisterId reg
,
41 lldb::ModuleSP module
);
42 DWARFExpression
MakeVFrameRelLocationExpression(llvm::StringRef fpo_program
,
44 lldb::ModuleSP module
);
45 DWARFExpression
MakeGlobalLocationExpression(uint16_t section
, uint32_t offset
,
46 lldb::ModuleSP module
);
47 DWARFExpression
MakeConstantLocationExpression(
48 llvm::codeview::TypeIndex underlying_ti
, llvm::pdb::TpiStream
&tpi
,
49 const llvm::APSInt
&constant
, lldb::ModuleSP module
);
50 DWARFExpression
MakeEnregisteredLocationExpressionForComposite(
51 const std::map
<uint64_t, MemberValLocation
> &offset_to_location
,
52 std::map
<uint64_t, size_t> &offset_to_size
, size_t total_size
,
53 lldb::ModuleSP module
);
55 } // namespace lldb_private