[PATCH] D40317: [llvm-dwarfdump] Display DW_AT_high_pc as absolute value

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 08:11:12 PST 2017


probinson added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:241
+    uint64_t LowPC, HighPC, Index;
+    if (Die.getLowAndHighPC(LowPC, HighPC, Index))
+      OS << format("0x%016" PRIx64, HighPC);
----------------
dblaikie wrote:
> It seems unfortunate that this searches for the low pc when we already have the form/attribute in formValue.
> 
> What happens if a buggy DIE has two LowPCs? This might erroneously print the same one twice? (I assume DWARF supports, in general, multiple instances of the same attribute in a DIE? or is that buggy enough to have been detected earlier?)
You can't repeat the same attribute in the same DIE, that's invalid DWARF.  I don't know whether the verifier checks for that.


Repository:
  rL LLVM

https://reviews.llvm.org/D40317





More information about the llvm-commits mailing list