From dd0e83355583898d19357abc5f17a9a94f057d74 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 20 Apr 2019 13:00:09 +0000 Subject: [PATCH] [llvm-symbolizer] Fix section index at the end of a section This is very minor issue. The returned section index is only used by DWARFDebugLine as an llvm::upper_bound input and the use case shouldn't cause any behavioral change. llvm-svn: 358814 --- llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp index e6e0de0..5d453de 100644 --- a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp +++ b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp @@ -313,9 +313,8 @@ uint64_t SymbolizableObjectFile::getModuleSectionIndexForAddress( continue; if (Address >= Sec.getAddress() && - Address <= Sec.getAddress() + Sec.getSize()) { + Address < Sec.getAddress() + Sec.getSize()) return Sec.getIndex(); - } } return object::SectionedAddress::UndefSection; -- 2.7.4