[PATCH] D74613: [DebugInfo] Fix printing CIE offset in EH FDEs.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 02:23:28 PST 2020
jhenderson added a comment.
Just making sure I understand: in .debug_frame, the cie_pointer field is always an absolute offset, whereas in .eh_frame, it is a relative value from the field, but we weren't making this distinction before, right? What does e.g. classic dwarfdump or GNU readelf display?
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:226
public:
// Each FDE has a CIE it's "linked to". Our FDE contains is constructed with
// an offset to the CIE (provided by parsing the FDE header). The CIE itself
----------------
Could you fix the second sentence of this comment (possibly as a separate commit). I think the "contains" needs deleting.
It might also be worth saying whether the offset is relative or from the start of the section.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:252
private:
/// The following fields are defined in section 6.4.1 of the DWARF standard v3
+ const uint64_t CIEPointer;
----------------
It may be worth making a note of the eh_frame/debug_frame difference here.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:317
+ OS << format("%08x %08x %08x", (uint32_t)Offset, (uint32_t)Length,
+ (uint32_t)CIEPointer)
+ << " FDE cie=";
----------------
I'm confused by the casting to 32-bits. I take it this code isn't DWARF64 ready yet?
Also, I'm not sure CIEPointer should be an unsigned type for .eh_frame at least. In the Ian Lance Taylor blog on the topic (https://www.airs.com/blog/archives/460), which I use as my .eh_frame "standard", it talks about how this value can be negative or positive. Do we have examples in tests which show the behaviour for positive and negative values?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74613/new/
https://reviews.llvm.org/D74613
More information about the llvm-commits
mailing list