llvm-6502/lib/DebugInfo
Frederic Riss 344b66866d Fix DWARFUnitSection::getUnitForOffset().
The current code is only able to return the right unit if the passed offset
is the exact offset of a section. Generalize the search function by comparing
againt the offset of the next unit instead and by switching the search
algorithm to upper_bound.

This way, the unit returned is the first unit with a getNextUnitOffset()
strictly greater than the searched offset, which is exactly what we want.
Note that there is no need for testing the range of the resulting unit as
the offsets of a DWARFUnitSection are in a single contiguous range from
0 inclusive to lastUnit->getNextUnitOffset() exclusive.

Reviewers: dblaikie samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5262

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218040 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-18 09:38:15 +00:00
..
CMakeLists.txt
DIContext.cpp Use a reference instead of a pointer. 2014-07-31 20:19:36 +00:00
DWARFAbbreviationDeclaration.cpp
DWARFAbbreviationDeclaration.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFCompileUnit.cpp
DWARFCompileUnit.h Introduce the DWARFUnitSection abstraction. 2014-09-15 07:50:27 +00:00
DWARFContext.cpp Introduce the DWARFUnitSection abstraction. 2014-09-15 07:50:27 +00:00
DWARFContext.h Introduce the DWARFUnitSection abstraction. 2014-09-15 07:50:27 +00:00
DWARFDebugAbbrev.cpp [DWARF parser] Cleanup code in DWARFDebugAbbrev. 2014-04-25 21:10:56 +00:00
DWARFDebugAbbrev.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugAranges.cpp [DWARF parser] Fix broken address ranges construction. 2014-06-12 23:58:49 +00:00
DWARFDebugAranges.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugArangeSet.cpp
DWARFDebugArangeSet.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugFrame.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
DWARFDebugFrame.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugInfoEntry.cpp [dwarfdump] Dump DW_AT_(decl|call)_line attribute values as decimal values. 2014-09-05 07:21:50 +00:00
DWARFDebugInfoEntry.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugLine.cpp [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier. 2014-05-15 21:24:32 +00:00
DWARFDebugLine.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugLoc.cpp
DWARFDebugLoc.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugRangeList.cpp
DWARFDebugRangeList.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFFormValue.cpp Fix build faliure introduced by r217129. 2014-09-04 06:35:09 +00:00
DWARFRelocMap.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFTypeUnit.cpp
DWARFTypeUnit.h Introduce the DWARFUnitSection abstraction. 2014-09-15 07:50:27 +00:00
DWARFUnit.cpp Introduce the DWARFUnitSection abstraction. 2014-09-15 07:50:27 +00:00
DWARFUnit.h Fix DWARFUnitSection::getUnitForOffset(). 2014-09-18 09:38:15 +00:00
LLVMBuild.txt
Makefile
module.modulemap [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00