stored relative to VFRAME Summary: This patch makes LLDB able to retrieve proper values for function arguments and local variables stored in PDB relative to VFRAME register. Patch contains retrieval of corresponding FPO table entries from PDB and a generic translator from FPO programs to DWARF expressions to get correct VFRAME value. Patch also improves variables-locations.test and makes this test passable on x86. Patch By: leonid.mashinsky Reviewers: zturner, asmith, stella.stamenova, aleksandr.urakov Reviewed By: zturner Subscribers: arphaman, labath, mgorny, aprantl, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D55122 llvm-svn: 352845
45 lines
1.7 KiB
C++
45 lines
1.7 KiB
C++
//===-- DWARFLocationExpression.h -------------------------------*- C++ -*-===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLDB_PLUGINS_SYMBOLFILE_NATIVEPDB_DWARFLOCATIONEXPRESSION_H
|
|
#define LLDB_PLUGINS_SYMBOLFILE_NATIVEPDB_DWARFLOCATIONEXPRESSION_H
|
|
|
|
#include "lldb/lldb-forward.h"
|
|
#include "llvm/DebugInfo/CodeView/CodeView.h"
|
|
|
|
namespace llvm {
|
|
class APSInt;
|
|
namespace codeview {
|
|
class TypeIndex;
|
|
}
|
|
namespace pdb {
|
|
class TpiStream;
|
|
}
|
|
} // namespace llvm
|
|
namespace lldb_private {
|
|
namespace npdb {
|
|
DWARFExpression
|
|
MakeEnregisteredLocationExpression(llvm::codeview::RegisterId reg,
|
|
lldb::ModuleSP module);
|
|
|
|
DWARFExpression MakeRegRelLocationExpression(llvm::codeview::RegisterId reg,
|
|
int32_t offset,
|
|
lldb::ModuleSP module);
|
|
DWARFExpression MakeVFrameRelLocationExpression(llvm::StringRef fpo_program,
|
|
int32_t offset,
|
|
lldb::ModuleSP module);
|
|
DWARFExpression MakeGlobalLocationExpression(uint16_t section, uint32_t offset,
|
|
lldb::ModuleSP module);
|
|
DWARFExpression MakeConstantLocationExpression(
|
|
llvm::codeview::TypeIndex underlying_ti, llvm::pdb::TpiStream &tpi,
|
|
const llvm::APSInt &constant, lldb::ModuleSP module);
|
|
} // namespace npdb
|
|
} // namespace lldb_private
|
|
|
|
#endif
|