[DwarfExpression] Support entry values for indirect parameters
authorVedant Kumar <vsk@apple.com>
Wed, 20 May 2020 22:30:58 +0000 (15:30 -0700)
committerVedant Kumar <vsk@apple.com>
Tue, 26 May 2020 21:22:28 +0000 (14:22 -0700)
commit6e39379bbbe1d8aba658f638dfc42f0ba0cbb926
tree9f322c9866ebd2093525b871ae2707d87deaa2d9
parent9abb0e8d5be2ffad06ccfcc2d5530997ad093b81
[DwarfExpression] Support entry values for indirect parameters

Summary:
A struct argument can be passed-by-value to a callee via a pointer to a
temporary stack copy. Add support for emitting an entry value DBG_VALUE
when an indirect parameter DBG_VALUE becomes unavailable. This is done
by omitting DW_OP_stack_value from the entry value expression, to make
the expression describe the location of an object.

rdar://63373691

Reviewers: djtodoro, aprantl, dstenb

Subscribers: hiraditya, lldb-commits, llvm-commits

Tags: #lldb, #llvm

Differential Revision: https://reviews.llvm.org/D80345
lldb/test/API/functionalities/param_entry_vals/basic_entry_values/main.cpp
llvm/docs/LangRef.rst
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
llvm/lib/CodeGen/LiveDebugValues.cpp
llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-indirect-param-with-offset.mir [new file with mode: 0644]
llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-indirect-param.mir [new file with mode: 0644]