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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 25 10:10:25 PDT 2020


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

Thanks!



================
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";
----------------
grimar wrote:
> 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.
OK


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

https://reviews.llvm.org/D80476





More information about the llvm-commits mailing list