[PATCH] D107554: [DWARF][Verifier] Do not add child DieRangeInfo with empty address range to the parent.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 6 11:34:41 PDT 2021


clayborg added a comment.

So I ran converted the yaml into an object file and ran my current llvm-dwarfdump against it:

  $ llvm-dwarfdump /tmp/a.out --verify --all
  Verifying /tmp/a.out:	file format Mach-O 64-bit x86-64
  Verifying .debug_abbrev...
  Verifying .debug_info Unit Header Chain...
  Verifying .debug_info references...
  Verifying .debug_types Unit Header Chain...
  Verifying .debug_line...
  No errors.

Don't we need the "no_range1" and "no_range2" to have an address range with zero size where high and low PC values are the same?



================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:419
       }
 
       // Verify that ranges don't intersect and also build up the DieRangeInfo
----------------
There is really no hope if this ever happening AFAIK. Most linkers do not understand DWARF at all, all they do is concatenate all DWARF sections from each .o file to each other and apply relocations. Anything that has no relocations gets a tombstone value of 0 or -1. The reason is DWARF is a stream that can't easily be manipulated with the standard toolbox available in most linkers, so it is really hard to remove anything without affecting the entire DWARF CU stream. I would love it if producers were able to do this, but without major changes to DWARF itself, I don't think a solution is coming anytime soon.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107554



More information about the llvm-commits mailing list