[PATCH] Fix DWARFContext::getCompileUnitForOffset().
Alexey Samsonov
vonosmas at gmail.com
Mon Sep 15 10:33:45 PDT 2014
================
Comment at: lib/DebugInfo/DWARFUnit.h:66
@@ -65,3 +65,3 @@
UnitType *getUnitForOffset(uint32_t Offset) const {
- auto *CU = std::lower_bound(this->begin(), this->end(), Offset,
+ auto *CU = std::upper_bound(this->begin(), this->end(), Offset,
UnitOffsetComparator());
----------------
You still need to check that Offset you're looking for is inside the CU.
http://reviews.llvm.org/D5262
More information about the llvm-commits
mailing list