llvm-project/llvm/test/DebugInfo
Mikael Holmen b69e5b7393 [GlobalOpt] Include padding in debug fragments
Summary:
When creating the debug fragments for a SRA'd variable, use the types'
allocation sizes. This fixes issues where the pass would emit too small
fragments, placed at the wrong offset, for padded types.

An example of this is long double on x86. The type is represented using
x86_fp80, which is 10 bytes, but the value is aligned to 12/16 bytes.
The padding is included in the type's DW_AT_byte_size attribute;
therefore, the fragments should also include that. Newer GCC releases
(I tested 7.2.0) emit 12/16-byte pieces for long double. Earlier
releases, e.g. GCC 5.5.0, behaved as LLVM did, i.e. by emitting a
10-byte piece, followed by an empty 2/6-byte piece for the padding.

Failing to cover all `DW_AT_byte_size' bytes of a value with non-empty
pieces results in the value being printed as <optimized out> by GDB.

Patch by: David Stenberg

Reviewers: aprantl, JDevlieghere

Reviewed By: aprantl, JDevlieghere

Subscribers: llvm-commits

Tags: #debug-info

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

llvm-svn: 324066
2018-02-02 10:34:13 +00:00
..
AArch64 Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
AMDGPU Re-land "[llvm-dwarfdump] Print type names in DW_AT_type DIEs" 2017-10-10 14:15:25 +00:00
ARM Followup on Proposal to move MIR physical register namespace to '$' sigil. 2018-01-31 22:04:26 +00:00
COFF [CodeView] Class record member counts should include base classes and ... 2018-02-01 20:37:38 +00:00
Generic Refactor dwarfdump -apple-names output 2018-01-29 11:33:17 +00:00
Inputs [DebugInfo] Don't crash when given invalid DWARFv5 line table prologue. 2018-01-05 10:03:02 +00:00
Lanai
MIR Followup on Proposal to move MIR physical register namespace to '$' sigil. 2018-01-31 22:04:26 +00:00
MSP430 Followup on Proposal to move MIR physical register namespace to '$' sigil. 2018-01-31 22:04:26 +00:00
Mips [DebugInfo] Unify dumping of address ranges 2018-01-16 11:17:57 +00:00
NVPTX [DEBUG] Fix debug info test for NVPTX, NFC. 2018-01-04 23:50:24 +00:00
PDB Regex out the local hash comparison test. 2017-12-06 00:58:12 +00:00
PowerPC Canonicalize the representation of empty an expression in DIGlobalVariableExpression 2017-08-30 18:06:51 +00:00
Sparc [DebugInfo] Unify dumping of address ranges 2018-01-16 11:17:57 +00:00
SystemZ [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
WebAssembly [WebAssembly] Update debug info test after r312144 2017-08-30 19:54:08 +00:00
X86 [GlobalOpt] Include padding in debug fragments 2018-02-02 10:34:13 +00:00
arm-relocs.test llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
cross-cu-scope.ll [DebugInfo] Fix potential CU mismatch for SubprogramScopeDIEs. 2017-11-15 10:57:05 +00:00
debugify.ll [Debugify] Add a mode to opt to enable faster testing 2018-01-23 20:43:50 +00:00
debuglineinfo-macho.test
debuglineinfo.test
debugmacinfo.test llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
dwarfdump-64-bit-dwarf.test [DebugInfo] Dump a .debug_line section, including line-number program, 2017-11-22 15:48:30 +00:00
dwarfdump-accel.test Refactor dwarfdump -apple-names output 2018-01-29 11:33:17 +00:00
dwarfdump-debug-frame-simple.test [dwarfdump] Make .eh_frame an alias for .debug_frame 2017-09-18 14:15:57 +00:00
dwarfdump-decompression-corrupt.test [Object] Verify object sizes before handing out StringRefs pointing out 2017-08-31 12:27:10 +00:00
dwarfdump-decompression-error.test [llvm-dwarfdump] - Print an error message if section decompression failed. 2017-05-05 10:52:39 +00:00
dwarfdump-dump-flags.test llvm-dwarfdump: automatically dump both regular and .dwo variant of sections 2017-09-13 22:09:01 +00:00
dwarfdump-dump-gdbindex.test llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
dwarfdump-dwp.test llvm-dwarfdump: automatically dump both regular and .dwo variant of sections 2017-09-13 22:09:01 +00:00
dwarfdump-implicit-const.test llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
dwarfdump-invalid-line-table.test [DebugInfo] Don't crash when given invalid DWARFv5 line table prologue. 2018-01-05 10:03:02 +00:00
dwarfdump-invalid.test
dwarfdump-macho-relocs.test llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
dwarfdump-macho-universal.test Adapt more testcases for llvm-dwarfdump changes. 2017-09-14 17:27:03 +00:00
dwarfdump-objc.test llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
dwarfdump-pubnames.test llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
dwarfdump-ranges.test [DebugInfo] Unify dumping of address ranges 2018-01-16 11:17:57 +00:00
dwarfdump-type-units.test Re-land "[llvm-dwarfdump] Print type names in DW_AT_type DIEs" 2017-10-10 14:15:25 +00:00
dwarfdump-zlib.test llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
dwo.ll llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
invalid-relocations.test [DWARF] - Add testcase for checking message about broken relocations. 2017-07-11 12:29:07 +00:00
llvm-symbolizer-split-dwarf-empty.test [llvm] Get rid of "%T" expansions 2017-08-15 20:29:24 +00:00
llvm-symbolizer-zlib.test
llvm-symbolizer.test Migrate llvm-symbolizer tests to not use %T 2017-09-08 21:10:01 +00:00
macro_link.ll
member-pointers.o
missing-abstract-variable.o
omit-empty.ll DebugInfo: Consider a CU containing only local imported entities to be 'empty' 2017-07-28 03:06:25 +00:00
pr34186.ll Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00
pr34672.ll Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00
skeletoncu.ll llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
strip-DIGlobalVariable.ll
strip-loop-metadata.ll Improve DebugInfo/strip-loop-metadata.ll test 2017-03-31 17:51:12 +00:00
typeunit-header.test llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
unrolled-loop-remainder.ll [LoopUnroll][DebugInfo] Don't add metadata to unrolled remainder loop 2017-09-04 08:12:16 +00:00