1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/unittests
Vedant Kumar 48bac26038 [DebugInfo] LowerDbgDeclare: Add derefs when handling CallInst users
LowerDbgDeclare inserts a dbg.value before each use of an address
described by a dbg.declare. When inserting a dbg.value before a CallInst
use, however, it fails to append DW_OP_deref to the DIExpression.

The DW_OP_deref is needed to reflect the fact that a dbg.value describes
a source variable directly (as opposed to a dbg.declare, which relies on
pointer indirection).

This patch adds in the DW_OP_deref where needed. This results in the
correct values being shown during a debug session for a program compiled
with ASan and optimizations (see https://reviews.llvm.org/D49520). Note
that ConvertDebugDeclareToDebugValue is already correct -- no changes
there were needed.

One complication is that SelectionDAG is unable to distinguish between
direct and indirect frame-index (FRAMEIX) SDDbgValues. This patch also
fixes this long-standing issue in order to not regress integration tests
relying on the incorrect assumption that all frame-index SDDbgValues are
indirect. This is a necessary fix: the newly-added DW_OP_derefs cannot
be lowered properly otherwise. Basically the fix prevents a direct
SDDbgValue with DIExpression(DW_OP_deref) from being dereferenced twice
by a debugger. There were a handful of tests relying on this incorrect
"FRAMEIX => indirect" assumption which actually had incorrect
DW_AT_locations: these are all fixed up in this patch.

Testing:

- check-llvm, and an end-to-end test using lldb to debug an optimized
  program.
- Existing unit tests for DIExpression::appendToStack fully cover the
  new DIExpression::append utility.
- check-debuginfo (the debug info integration tests)

Differential Revision: https://reviews.llvm.org/D49454

llvm-svn: 338069
2018-07-26 20:56:53 +00:00
..
ADT [ADT] Replace std::isprint by llvm::isPrint. 2018-07-26 15:31:41 +00:00
Analysis llvm: Add support for "-fno-delete-null-pointer-checks" 2018-07-09 22:27:23 +00:00
AsmParser
BinaryFormat Re-land: [MachO] Fixing ub in MachO BinaryFormat 2018-06-03 20:33:42 +00:00
Bitcode Pass a reference to a module to the bitcode writer. 2018-02-14 19:11:32 +00:00
CodeGen [GISel]: Pattern matchers for GFSUB, GFNEG 2018-05-31 19:30:01 +00:00
DebugInfo dwarfgen: Add support for generating the debug_str_offsets section, take 3 2018-07-26 14:36:07 +00:00
Demangle [demangler] Add ItaniumPartialDemangler::isCtorOrDtor 2018-05-24 06:57:57 +00:00
ExecutionEngine [ORC] Re-apply r336760 with fixes. 2018-07-21 00:12:05 +00:00
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR [DebugInfo] LowerDbgDeclare: Add derefs when handling CallInst users 2018-07-26 20:56:53 +00:00
LineEditor
Linker Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
MC [WebAssembly] Remove ELF file support. 2018-07-16 23:09:29 +00:00
MI [LiveIntervals] Handle moving up dead partial write 2018-02-26 14:42:13 +00:00
Object
ObjectYAML
Option Re-revert "[Option] Fix PR37006 prefix choice in findNearest" 2018-05-19 16:21:01 +00:00
Passes Fix build warning compiling TestPlugin on Windows and disable Passes plugin stuff on Windows since it fundamentally can't work 2018-05-19 03:05:30 +00:00
ProfileData [NFC] Change sample profile format enum name SPF_Raw_Binary to SPF_Binary. 2018-06-12 05:53:49 +00:00
Support [Support] Introduce createStringError helper function 2018-07-26 02:21:40 +00:00
Target [WebAssembly] Add WebAssemblyException information analysis 2018-06-25 01:20:21 +00:00
tools [cfi-verify] Support AArch64. 2018-07-13 15:19:33 +00:00
Transforms Recommit r336653: [VPlan] Add VPlanTestBase.h with helper 2018-07-11 11:54:30 +00:00
XRay Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
CMakeLists.txt alphabetize list 2018-05-14 18:23:05 +00:00