[PATCH] D74613: [DebugInfo] Fix printing CIE offset in EH FDEs.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 14 07:09:59 PST 2020


ikudrin created this revision.
ikudrin added reviewers: probinson, dblaikie, jhenderson, aprantl.
ikudrin added projects: LLVM, debug-info.
Herald added subscribers: luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, Jim, jocewei, rupprecht, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, atanasyan, edward-jones, zzheng, MaskRay, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, sdardis, emaste.
Herald added a reviewer: espindola.

While in .debug_frame a value of the CIE pointer field is an offset to a corresponding CIE record from the beginning of the section, in .eh_frame it is relative to the current offset. Previously, when we dumped FDE records, we just printed the same value for both the CIE pointer field and the CIE offset, which worked for .debug_frame sections but was wrong for .eh_frame ones. This patch fixes the issue by printing the kept offset of the linked CIE object.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74613

Files:
  lld/test/ELF/eh-frame-hdr-augmentation.s
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
  llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
  llvm/test/DebugInfo/RISCV/eh-frame.s
  llvm/test/DebugInfo/X86/debug_frame-invalid-cie-offset.s
  llvm/test/MC/Mips/eh-frame.s
  llvm/test/tools/llvm-dwarfdump/X86/debug_frame_GNU_args_size.s
  llvm/test/tools/llvm-dwarfdump/X86/debug_frame_offset.test
  llvm/test/tools/llvm-objdump/eh_frame-arm64.test
  llvm/test/tools/llvm-objdump/eh_frame-coff.test
  llvm/test/tools/llvm-objdump/eh_frame-mipsel.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74613.244656.patch
Type: text/x-patch
Size: 8318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200214/ec2efb96/attachment-0001.bin>


More information about the llvm-commits mailing list