forked from OSchip/llvm-project
1ae2d9a2bd
Summary: Internally in LLVM's metadata we use DW_OP_entry_value operations with the same semantics as DWARF; that is, its operand specifies the number of bytes that the entry value covers. At the time of emitting entry values we don't know the emitted size of the DWARF expression that the entry value will cover. Currently the size is hardcoded to 1 in DIExpression, and other values causes the verifier to fail. As the size is 1, that effectively means that we can only have valid entry values for registers that can be encoded in one byte, which are the registers with DWARF numbers 0 to 31 (as they can be encoded as single-byte DW_OP_reg0..DW_OP_reg31 rather than a multi-byte DW_OP_regx). It is a bit confusing, but it seems like llvm-dwarfdump will print an operation "correctly", even if the byte size is less than that, which may make it seem that we emit correct DWARF for registers with DWARF numbers > 31. If you instead use readelf for such cases, it will interpret the number of specified bytes as a DWARF expression. This seems like a limitation in llvm-dwarfdump. As suggested in D66746, a way forward would be to add an internal variant of DW_OP_entry_value, DW_OP_LLVM_entry_value, whose operand instead specifies the number of operations that the entry value covers, and we then translate that into the byte size at the time of emission. In this patch that internal operation is added. This patch keeps the limitation that a entry value can only be applied to simple register locations, but it will fix the issue with the size operand being incorrect for DWARF numbers > 31. Reviewers: aprantl, vsk, djtodoro, NikolaPrica Reviewed By: aprantl Subscribers: jyknight, fedor.sergeev, hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D67492 llvm-svn: 374881 |
||
---|---|---|
.. | ||
AArch64 | ||
AMDGPU | ||
ARM | ||
COFF | ||
Generic | ||
Inputs | ||
Lanai | ||
MIR | ||
MSP430 | ||
Mips | ||
NVPTX | ||
PDB | ||
PowerPC | ||
RISCV | ||
Sparc | ||
SystemZ | ||
WebAssembly | ||
X86 | ||
arange-overlap.test | ||
arm-relocs.test | ||
check-debugify-preserves-analyses.ll | ||
cross-cu-inlining.test | ||
cross-cu-scope.ll | ||
debugify-bogus-dbg-value.ll | ||
debugify-each.ll | ||
debugify-export.ll | ||
debugify-report-missing-locs-only.ll | ||
debugify.ll | ||
debuglineinfo-macho.test | ||
debuglineinfo-path.ll | ||
debuglineinfo.test | ||
debugmacinfo.test | ||
dwarfdump-64-bit-dwarf.test | ||
dwarfdump-accel.test | ||
dwarfdump-bad-lookup-address.test | ||
dwarfdump-debug-frame-simple.test | ||
dwarfdump-decompression-corrupt.test | ||
dwarfdump-decompression-error.test | ||
dwarfdump-dump-flags.test | ||
dwarfdump-dump-gdbindex.test | ||
dwarfdump-dwp.test | ||
dwarfdump-implicit-const.test | ||
dwarfdump-invalid-line-table.test | ||
dwarfdump-invalid.test | ||
dwarfdump-macho-relocs.test | ||
dwarfdump-macho-universal.test | ||
dwarfdump-objc.test | ||
dwarfdump-pubnames.test | ||
dwarfdump-ranges.test | ||
dwarfdump-type-units.test | ||
dwarfdump-zlib.test | ||
dwo.ll | ||
gcc-local-mem-func.test | ||
high-pc-constant.test | ||
invalid-relocations.test | ||
macro_link.ll | ||
member-pointers.o | ||
missing-abstract-variable.o | ||
omit-empty.ll | ||
pr34186.ll | ||
pr34672.ll | ||
precomp.test | ||
skeletoncu.ll | ||
strip-DIGlobalVariable.ll | ||
strip-loop-metadata.ll | ||
strip-module-flags.ll | ||
symbolize-64bit-address.test | ||
symbolize-absolute-path-in-debug-line.s | ||
symbolize-demangling.s | ||
symbolize-directory.s | ||
symbolize-gnu-debuglink-fallback.test | ||
symbolize-gnu-debuglink-no-realpath.test | ||
symbolize-gnu-debuglink.test | ||
symbolize-inlined.test | ||
symbolize-macho-universal-unknown-arch.test | ||
symbolize-macho-universal.test | ||
symbolize-missing-file.test | ||
symbolize-no-debug-str.test | ||
symbolize-shared-abbrev.s | ||
symbolize-split-dwarf-empty.test | ||
symbolize-split-dwarf-no-skel-address.test | ||
symbolize-stripped-sections.test | ||
symbolize-stripped.test | ||
symbolize-tu.test | ||
symbolize-zlib.test | ||
symbolize.test | ||
typeunit-header.test | ||
unrolled-loop-remainder.ll |