1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/DebugInfo
David Stenberg a98c027f78 [DebugInfo] Do not emit entry values for composite locations
Summary:
This is a fix for PR45009.

When working on D67492 I made DwarfExpression emit a single
DW_OP_entry_value operation covering the whole composite location
description that is produced if a register does not have a valid DWARF
number, and is instead composed of multiple register pieces. Looking
closer at the standard, this appears to not be valid DWARF. A
DW_OP_entry_value operation's block can only be a DWARF expression or a
register location description, so it appears to not be valid for it to
hold a composite location description like that.

See DWARFv5 sec. 2.5.1.7:

"The DW_OP_entry_value operation pushes the value that the described
 location held upon entering the current subprogram. It has two
 operands: an unsigned LEB128 length, followed by a block containing a
 DWARF expression or a register location description (see Section
 2.6.1.1.3 on page 39)."

Here is a dwarf-discuss mail thread regarding this:

http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2020-March/004610.html

There was not a strong consensus reached there, but people seem to lean
towards that operations specified under 2.6 (e.g. DW_OP_piece) may not
be part of a DWARF expression, and thus the DW_OP_entry_value operation
can't contain those.

Perhaps we instead want to emit a entry value operation per each
DW_OP_reg* operation, e.g.:

  - DW_OP_entry_value(DW_OP_regx sub_reg0),
    DW_OP_stack_value,
    DW_OP_piece 8,
  - DW_OP_entry_value(DW_OP_regx sub_reg1),
    DW_OP_stack_value,
    DW_OP_piece 8,
  [...]

The question then becomes how the call site should look; should a
composite location description be emitted there, and we then leave it up
to the debugger to match those two composite location descriptions?
Another alternative could be to emit a call site parameter entry for
each sub-register, but firstly I'm unsure if that is even valid DWARF,
and secondly it seems like that would complicate the collection of call
site values quite a bit. As far as I can tell GCC does not emit any
entry values / call sites in these cases, so we do not have something to
compare with, but the former seems like the more reasonable approach.

Currently when trying to emit a call site entry for a parameter composed
of multiple DWARF registers a (DwarfRegs.size() == 1) assert is
triggered in addMachineRegExpression(). Until the call site
representation is figured out, and until there is use for these entry
values in practice, this commit simply stops the invalid DWARF from
being emitted.

Reviewers: djtodoro, vsk, aprantl

Reviewed By: djtodoro, vsk

Subscribers: jyknight, hiraditya, fedor.sergeev, jrtc27, llvm-commits

Tags: #debug-info, #llvm

Differential Revision: https://reviews.llvm.org/D75270
2020-07-01 10:50:55 +02:00
..
AArch64 Reland D73534: [DebugInfo] Enable the debug entry values feature by default 2020-03-19 13:57:30 +01:00
AMDGPU [AMDGPU] Add Scratch Wave Offset to Scratch Buffer Descriptor in entry functions 2020-03-19 15:35:16 -04:00
ARM [ARM] Move ConstantIsland and LowOverheadLoops Passes. 2020-03-25 16:49:21 +01:00
BPF [DebugInfo] Fix assertion for extern void type 2020-06-08 13:43:18 -07:00
COFF [CodeView] Revert 8374bf43634725dc02a262a77b5f940fca25938c and 403f9537924b8910ed4f741ed96c61f5e657915b 2020-06-18 16:18:46 -04:00
Generic [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
Inputs [DebugInfo] Explicitly permit addr_size = 0x02 when parsing DWARF data 2020-06-22 13:11:55 +03:00
Lanai
Mips [CSInfo][MIPS][DwarfDebug] Add support for delay slots 2020-06-03 11:25:17 +02:00
MIR [CSInfo][MIPS] Don't describe parameters loaded by sub/super reg copy 2020-06-22 10:49:02 +02:00
MSP430 Attempt to unbreak the test introduced in 359fae6eb094 on Windows 2020-06-22 14:41:55 +03:00
NVPTX [Instruction] Set metadata uses to undef on deletion 2020-05-21 15:58:12 -07:00
PDB [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
PowerPC [DWARF] - Emit the correct value for DW_AT_addr_base. 2018-09-20 09:17:36 +00:00
RISCV [DebugInfo] Report the format of line tables [7/10] 2020-06-02 17:55:31 +07:00
Sparc [DebugInfo] Do not emit entry values for composite locations 2020-07-01 10:50:55 +02:00
SystemZ [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
WebAssembly [WebAssembly] fixed target index strings in DebugInfo test 2020-04-16 17:11:14 -07:00
X86 [DEBUGINFO]Add a test for packed bitfields, NFC. 2020-06-29 14:14:14 -04:00
arange-overlap.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
arm-relocs.test
cDefaultLower.ll [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays 2020-05-28 13:46:41 +05:30
check-debugify-preserves-analyses.ll
cross-cu-inlining.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
cross-cu-scope.ll Specify REQUIRES: default_triple in two debuginfo tests 2018-11-06 00:16:32 +00:00
debug-frame-cie-pointer-reloc.test [DebugInfo] Read CIE pointer as a relocatable value. 2020-02-20 09:12:05 +07:00
debugify-bogus-dbg-value.ll [Debugify] Allow unsigned values narrower than their variables 2018-07-06 17:32:40 +00:00
debugify-each.ll [Debugify] Strip added metadata in the -debugify-each pipeline 2020-04-13 10:55:17 -07:00
debugify-export.ll [Debugify] Export per-pass debug info loss statistics 2018-07-24 00:41:29 +00:00
debugify-report-missing-locs-only.ll [debugify] Demote an error about empty locations to a warning 2020-06-26 14:55:02 -07:00
debugify.ll [debugify] Demote an error about empty locations to a warning 2020-06-26 14:55:02 -07:00
debuglineinfo-macho.test
debuglineinfo-path.ll Restore REQUIRES: default_triple to a test 2020-03-03 09:43:36 -08:00
debuglineinfo.test Reapply: DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is empty (devoid of code addresses) 2018-12-21 22:25:01 +00:00
debugmacinfo-dwo.test [DebugInfo] Support for debug_macinfo.dwo section in llvm and llvm-dwarfdump. 2019-12-03 08:54:12 +05:30
debugmacinfo.test
duplicate_dbgvalue.ll [DebugInfo] Avoid generating duplicate llvm.dbg.value 2020-03-03 09:56:45 +05:30
dwarfdump-16bit-addr.test [DebugInfo] Explicitly permit addr_size = 0x02 when parsing DWARF data 2020-06-22 13:11:55 +03:00
dwarfdump-accel.test
dwarfdump-bad-lookup-address.test [DWARF] check whether the DIE is valid before querying for information 2019-04-03 17:13:45 +00:00
dwarfdump-dataLocationExp.ll Fixed arm build bot failure after 4042ada1c1fe 2020-05-15 23:30:05 +05:30
dwarfdump-dataLocationVar.ll Fixed arm build bot failure after 4042ada1c1fe 2020-05-15 23:30:05 +05:30
dwarfdump-debug-frame-simple.test
dwarfdump-decompression-corrupt.test llvm-dwarfdump: Return non-zero on error 2020-04-09 20:53:58 -07:00
dwarfdump-decompression-error.test llvm-dwarfdump: Return non-zero on error 2020-04-09 20:53:58 -07:00
dwarfdump-dump-flags.test
dwarfdump-dump-gdbindex.test [llvm-dwarfdump] --gdb-index: fix uninitialized TuListOffset 2019-06-19 13:51:29 +00:00
dwarfdump-dwp.test llvm-dwarfdump: Include unit count in DWP index header dumping 2020-06-12 12:40:02 -07:00
dwarfdump-implicit-const.test
dwarfdump-invalid.test
dwarfdump-macho-relocs.test
dwarfdump-macho-universal.test
dwarfdump-objc.test
dwarfdump-pubnames.test [DebugInfo] Report the format of tables in .debug_pub* sections [8/10] 2020-06-02 17:55:31 +07:00
dwarfdump-pushobjectaddress.ll Fixed arm build bot failure after ab699d78a26f 2020-05-15 23:14:56 +05:30
dwarfdump-ranges.test Revert "[DWARF] reposting r342048, which was reverted in r342056 due to buildbot errors. Adjusted 2 test cases for ARM and darwin and fixed a bug with the original change in dsymutil." 2018-09-17 15:40:01 +00:00
dwarfdump-type-units.test [DebugInfo] Separate fields with commas in headers of type units (3/3). 2020-06-01 17:40:28 +07:00
dwarfdump-zlib.test [DebugInfo] Report the format of compilation units [3/10] 2020-06-02 17:55:30 +07:00
dwo.ll
fortranDefaultLower.ll [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays 2020-05-28 13:46:41 +05:30
fortranSubrangeExpr.ll [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays 2020-05-28 13:46:41 +05:30
fortranSubrangeInt.ll [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays 2020-05-28 13:46:41 +05:30
fortranSubrangeVar.ll Fixed bot failure after d20bf5a7258d4b6a7 2020-05-28 18:01:38 +05:30
gcc-local-mem-func.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
high-pc-constant.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
invalid-relocations.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
macro_link.ll
member-pointers.o
missing-abstract-variable.o
omit-empty.ll
pr34186.ll
pr34672.ll
pr37964.ll [Transforms][Debugify] Ignore PHI nodes when checking for DebugLocs 2020-02-27 16:14:11 +00:00
precomp.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
salvage-cast-debug-info.ll Reapply: [DebugInfo] Correctly handle salvaged casts and split fragments at ISel 2019-12-18 16:26:42 +00:00
simplify-cfg-preserve-dbg-values.ll [SimplifyCFG] Remap rewritten debug intrinsic operands. 2020-05-08 11:10:25 -07:00
skeletoncu.ll
strip-DIGlobalVariable.ll
strip-loop-metadata.ll
strip-module-flags.ll
symbolize-64bit-address.test [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-absolute-path-in-debug-line.s [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-build-id-error.test [Symbolize] Handle error after the notes loop 2020-01-27 11:00:27 -08:00
symbolize-build-id.test [llvm-symbolizer] Support debug file lookup using build ID 2019-12-04 15:07:56 -08:00
symbolize-demangling.s [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#2) 2019-01-31 14:17:33 +00:00
symbolize-directory.s Fix more Windows bots after r360015. 2019-05-06 19:12:25 +00:00
symbolize-gnu-debuglink-fallback.test [DebugInfo] Fix /usr/lib/debug llvm-symbolizer lookup with relative paths 2019-02-11 18:05:48 +00:00
symbolize-gnu-debuglink-no-realpath.test [DebugInfo] Fix mkdir use in test 2019-02-01 21:14:21 +00:00
symbolize-gnu-debuglink.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#3) 2019-01-31 14:22:50 +00:00
symbolize-inlined.test [test][tools] Add missing and improve testing 2019-12-09 12:24:23 +00:00
symbolize-macho-universal-unknown-arch.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#2) 2019-01-31 14:17:33 +00:00
symbolize-macho-universal.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#2) 2019-01-31 14:17:33 +00:00
symbolize-missing-file.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#3) 2019-01-31 14:22:50 +00:00
symbolize-no-debug-str.test [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-paths.s attempt to fix symbolize-paths.s everywhere after cd68f4 2020-01-29 14:26:50 -05:00
symbolize-shared-abbrev.s [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-split-dwarf-empty.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
symbolize-split-dwarf-no-skel-address.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
symbolize-stripped-sections.test [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-stripped.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
symbolize-tu.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
symbolize-zlib.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
symbolize.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
typeunit-header.test [DebugInfo] Report the format of type units [10/10] 2020-06-02 17:55:31 +07:00
unrolled-loop-remainder.ll Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00