[PATCH] D66600: Add encode and decode methods to InlineInfo and document encoding format to the GSYM file format

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 07:08:06 PDT 2019


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


================
Comment at: lib/DebugInfo/GSYM/Range.cpp:46
+bool AddressRanges::contains(AddressRange Range) const {
+  if (Range.size() == 0)
+    return false;
----------------
MaskRay wrote:
> Do you know why it returns false if `Range.size() == 0`?
> 
> If I remove `Range.size() == 0`, the following test will break
> 
> ```
> EXPECT_FALSE(Ranges.contains(AddressRange(0x1000, 0x1000)));
> ```
This is looking forward to the time when we convert debug info into GSYM. Many compilers will make the low PC and high PC the same for debug info that has been optimized out. Also, an address range with no size is not a valid address range, so it can't be contained inside of another. 


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

https://reviews.llvm.org/D66600





More information about the llvm-commits mailing list