llvm-capstone/llvm/lib
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
..
Analysis Remove CallGraphTraits and use equivalent methods in GraphTraits 2018-02-01 19:40:35 +00:00
AsmParser LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
BinaryFormat [Support] Move DJB hash to support. NFC 2018-01-28 11:05:10 +00:00
Bitcode Re-land "[ThinLTO] Add call edges' relative block frequency to per-module summary." 2018-01-25 19:27:17 +00:00
CodeGen [SelectionDAG] Consider endianness in scalarizeVectorStore(). 2018-02-02 08:48:02 +00:00
DebugInfo [CodeView] Micro-optimizations to speed up type merging. 2018-01-30 17:12:04 +00:00
Demangle
ExecutionEngine Move getPlatformFlags to ELFObjectFileBase and simplify. 2018-01-29 18:27:30 +00:00
Fuzzer
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR [LLVM-C] Add Accessors For A Module's Source File Name 2018-01-30 21:34:29 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LineEditor
Linker [IRMover] Add comment and fix test case 2018-01-25 08:35:52 +00:00
LTO [ThinLTO/gold] Write empty imports even for modules with symbols 2018-01-30 21:19:26 +00:00
MC [MC] Fix assembler infinite loop on EH table using LEB padding. 2018-02-01 00:25:19 +00:00
Object [RISCV] Add ELFObjectFileBase::getRISCVFeatures let llvm-objdump could get RISCV target feature 2018-02-02 06:01:02 +00:00
ObjectYAML CodeGen: support an extension to pass linker options on ELF 2018-01-30 16:29:29 +00:00
Option [Option] For typo '-foo', suggest '--foo' 2018-01-09 19:38:04 +00:00
Passes Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
ProfileData
Support [ADT] Replace sys::MemoryFence with standard atomics. 2018-02-01 20:28:33 +00:00
TableGen [TblGen] Inline an (almost) trivial accessor. No functionality change. 2018-01-23 23:03:50 +00:00
Target [X86] Legalize (v64i1 (bitcast (i64 X))) on 32-bit targets by extracting 32-bit halves from i32, bitcasting each to v32i1, and concatenating. 2018-02-02 05:59:33 +00:00
Testing
ToolDrivers [COFF] Keep the underscore on exported decorated stdcall functions in MSVC mode 2018-01-20 11:44:32 +00:00
Transforms [GlobalOpt] Include padding in debug fragments 2018-02-02 10:34:13 +00:00
WindowsManifest
XRay [XRay] clarify error messages when parsing broken traces 2018-01-30 13:41:34 +00:00
CMakeLists.txt
LLVMBuild.txt