[PATCH] D80476: [DebugInfo/llvm-objdump] - Print "ZERO terminator" for terminator entries when dumping .eh_frame.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 25 02:06:32 PDT 2020


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:308
+  // A CIE with a zero length is a terminator entry in the .eh_frame sextion.
+  if (IsEH && Length == 0) {
+    OS << format("%08" PRIx64, Offset) << " ZERO terminator\n";
----------------
MaskRay wrote:
> `binutils-gdb/binutils/dwarf.c:display_debug_frames` displays `ZERO terminator` for both `.eh_frame` and `.debug_frame`. We can be consistent here.
This is something I am not sure in. I've not found in DWARF5 specification anything that says the length can be 0 for `.debug_frame` (e,g http://www.dwarfstd.org/doc/DWARF5.pdf, p174).

Being consistent is perhaps OK here, but it doesn't seem that `.debug_frame` is supposed to have a terminator? Probably we should not print "ZERO terminator" for `.debug_frame` (at least in this patch) then.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80476/new/

https://reviews.llvm.org/D80476





More information about the llvm-commits mailing list